Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimplePropertiesTriggerPersistenceDelegateSupport incorrectly loads properties of type long #1140

Open
kirmerzlikin opened this issue Jul 6, 2024 · 2 comments · May be fixed by #1141
Open

Comments

@kirmerzlikin
Copy link

When loading extended trigger properties, SimplePropertiesTriggerPersistenceDelegateSupport loads properties of type long as ints:

properties.setLong1(rs.getInt(COL_LONG_PROP_1));
properties.setLong2(rs.getInt(COL_LONG_PROP_2));

This leads to an exception, when values exceed the max value of int:

Couldn't retrieve trigger: Invalid data conversion: requested conversion would result in a loss of precision of 9223372036854775807
org.quartz.JobPersistenceException: Couldn't retrieve trigger: Invalid data conversion: requested conversion would result in a loss of precision of 9223372036854775807 [See nested exception: java.sql.SQLDataException: Invalid data conversion: requested conversion would result in a loss of precision of 9223372036854775807]
	at app//org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1539)
	at app//org.quartz.impl.jdbcjobstore.JobStoreSupport$12.execute(JobStoreSupport.java:1527)
	at app//org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
	at app//org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:95)
	at app//org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3800)
	at app//org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1524)

To fix this, SimplePropertiesTriggerPersistenceDelegateSupport needs to load these values using java.sql.ResultSet#getLong().

PS: I understand that this project seems to be abandoned (#1134), so I'm reporting this for posterity's sake.

@kirmerzlikin kirmerzlikin linked a pull request Jul 6, 2024 that will close this issue
4 tasks
@lprimak
Copy link

lprimak commented Jul 10, 2024

This project is abandoned. See #1134

@kirmerzlikin
Copy link
Author

@lprimak What is the point of stating something that is already mentioned in the issue description?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants