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

Unable to use quartz as scheduler for ScheduledPollConsumer in native mode #1663

Closed
jamesnetherton opened this issue Sep 1, 2020 · 0 comments · Fixed by #1665
Closed

Unable to use quartz as scheduler for ScheduledPollConsumer in native mode #1663

jamesnetherton opened this issue Sep 1, 2020 · 0 comments · Fixed by #1665
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jamesnetherton
Copy link
Contributor

Components that leverage ScheduledPollConsumer allow you to specify the scheduler to use. When using quartz, there are failures at runtime in native mode:

2020-09-01 09:48:00,000 ERROR [org.qua.cor.ErrorLogger] (DefaultQuartzScheduler-camel-quarkus-xml_QuartzSchedulerThread) An error occured instantiating job to be executed. job= 'DEFAULT.6da64b5bd2ee-ba5b34dc-56b8-4169-bf94-a1bae35a1df5': org.quartz.SchedulerException: Problem instantiating class 'org.apache.camel.pollconsumer.quartz.QuartzScheduledPollConsumerJob' [See nested exception: java.lang.InstantiationException: Type `org.apache.camel.pollconsumer.quartz.QuartzScheduledPollConsumerJob` can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.]
	at org.quartz.simpl.SimpleJobFactory.newJob(SimpleJobFactory.java:58)
	at org.quartz.simpl.PropertySettingJobFactory.newJob(PropertySettingJobFactory.java:69)
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: java.lang.InstantiationException: Type `org.apache.camel.pollconsumer.quartz.QuartzScheduledPollConsumerJob` can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.
	at java.lang.Class.newInstance(DynamicHub.java:830)
	at org.quartz.simpl.SimpleJobFactory.newJob(SimpleJobFactory.java:56)
	... 5 more
@jamesnetherton jamesnetherton added the bug Something isn't working label Sep 1, 2020
@jamesnetherton jamesnetherton self-assigned this Sep 1, 2020
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Sep 1, 2020
@jamesnetherton jamesnetherton added this to the 1.1.0 milestone Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant