Reputation: 350
I am getting a strange error on Wildfly where it is not deploying a WAR file.
My exact setup is per the below:
OS : Windows 10 JDK : Amazon Correto 17.0.11.9.1 WildFly : 22.0.1.Final IntelliJ : IntelliJ IDEA 2024.1 (Ultimate Edition)
Analyzing the Wildfly logs we are presented with the following error:
2024-04-19 10:50:38,612 DEBUG [org.jboss.as.ee] (MSC service thread 1-1) Ignoring failure to handle interceptor annotations for com.mycompany.job.RunMyJob: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class java.lang.Thread with ClassLoader null
at [email protected]//org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at [email protected]//org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at [email protected]//org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at [email protected]//org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:85)
at [email protected]//org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at [email protected]//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at [email protected]//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private volatile java.lang.String java.lang.Thread.name accessible: module java.base does not "opens java.lang" to unnamed module @31664cec
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at [email protected]//org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:75)
at [email protected]//org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Steps taken to try and resolve so far are:
Key Observations Seen:
Root Lines Of Code:
The class com.mycompany.job.RunMyJob
is a Quartz scheduled task, but more importantly it has the
@Stateless
annotation at the top of it, which in turn uses the following import
import javax.ejb.Stateless;
Now removing the @Stateless
causes the problem to be resolved. But we need the class to be stateless.
Any help would be greatly appreciated.
Upvotes: 0
Views: 55