-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Our Quartz smoke test fails because of missing Quartz metadata.
We've worked around that by using buildArgs.addAll('-H:+UnlockExperimentalVMOptions', '-H:Preserve=package=org.quartz.*').
We're using org.quartz-scheduler:quartz:2.5.0.
Caused by: org.graalvm.nativeimage.MissingReflectionRegistrationError: Cannot reflectively invoke method 'public void org.quartz.impl.jdbcjobstore.JobStoreSupport.setInstanceName(java.lang.String)'. To allow this operation, add the following to the 'reflection' section of 'reachability-metadata.json' and rebuild the native image:
{
"type": "org.quartz.impl.jdbcjobstore.JobStoreSupport",
"methods": [
{
"name": "setInstanceName",
"parameterTypes": [
"java.lang.String"
]
}
]
}
The 'reachability-metadata.json' file should be located in 'META-INF/native-image/<group-id>/<artifact-id>/' of your project. For further help, see https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection
at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.MissingReflectionRegistrationUtils.reportInvokedExecutable(MissingReflectionRegistrationUtils.java:110)
at java.base@25/java.lang.reflect.Method.acquireMethodAccessor(Method.java:144)
at java.base@25/java.lang.reflect.Method.invoke(Method.java:562)
at org.quartz.impl.SchedulerDetailsSetter.set(SchedulerDetailsSetter.java:73)
at org.quartz.impl.SchedulerDetailsSetter.setDetails(SchedulerDetailsSetter.java:46)
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:886)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1570)
at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:669)
at org.springframework.scheduling.quartz.SchedulerFactoryBean.prepareScheduler(SchedulerFactoryBean.java:605)
at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:492)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1865)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1814)
... 18 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request