JBAS018757: Error getting reflective information for class in JBoss EAP 6

Solution Verified - Updated -

Issue

  • In my EAR, I have extended a class in a 3rd party library which is in a custom module in the modules directory and have used the tag in the jboss-deployment-structure.xml file to specify a relative path to the modules directory containing the jar for the extended class.
ERROR [fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.subunit."example.ear"."example-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."example.ear"."example-ejb.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "example-ejb.jar" of deployment "example.ear"
  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.jboss.examples.ejb.ExampleSingleton with ClassLoader ModuleClassLoader for Module "deployment.example.ear.example-ejb.jar:main" from Service Module Loader
  at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72)
  at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
  at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
  at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
  at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)
  ... 5 more
Caused by: java.lang.NoClassDefFoundError: Lcom/jboss/examples/Example;
  at java.lang.Class.getDeclaredFields0(Native Method)
  at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
  at java.lang.Class.getDeclaredFields(Class.java:1760)
  at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)
  at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68)
  ... 10 more
Caused by: java.lang.ClassNotFoundException: com.jboss.examples.Example from [Module "deployment.example.ear.example-ejb.jar:main" from Service Module Loader]
  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
  ... 15 more

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content