3 Replies Latest reply on Oct 27, 2017 1:17 PM by Wayne Wang

    Issue with deploying EAR file in domain mode (not in standalone mode)

    Wayne Wang Apprentice

      Hi,

       

      I developed a JEE6 application in EAR file, and I was able to deploy it in standalone mode by putting it in standalone/deployment folder.

       

      I am currently investigating running the application in domain mode and I need to deploy it through the management console (port 9990). I immediately got into issue with the ear file which works file when deployed in standalone/deployment folder.

       

      I have a Singleton Bean that needs to reference infinispan. However, infinispan is already part of the wildfly runtime. But I got the following error log:

       

      2017-10-26 12:01:53,632 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 113) HHH000204: Processing PersistenceUnitInfo [

              name: primaryXA

              ...]

      2017-10-26 12:01:53,633 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 114) HHH000204: Processing PersistenceUnitInfo [

              name: primary

              ...]

      2017-10-26 12:01:53,724 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment wildfly-booking-ear-web.war

      2017-10-26 12:01:53,726 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."wildfly-booking-ear.ear"."wildfly-booking-ear-ejb.jar".POST_MODULE: org.jboss.msc.service.St

      artException in service jboss.deployment.subunit."wildfly-booking-ear.ear"."wildfly-booking-ear-ejb.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "wildfly-booking-ear-ejb.jar" of deployment "wildfly-

      booking-ear.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class org.jboss.as.quickstarts.kitchensink_ear.service.BookingCountsCacheSingleton with ClassLoader ModuleClassLoader for Module "deployment.wil

      dfly-booking-ear.ear.wildfly-booking-ear-ejb.jar:main" from Service Module Loader

              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)

              at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)

              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)

              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)

              at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)

              ... 5 more

      Caused by: java.lang.NoClassDefFoundError: Lorg/infinispan/Cache;

              at java.lang.Class.getDeclaredFields0(Native Method)

              at java.lang.Class.privateGetDeclaredFields(Class.java:2583)

              at java.lang.Class.getDeclaredFields(Class.java:1916)

              at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)

              at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)

              ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.infinispan.Cache from [Module "deployment.wildfly-booking-ear.ear.wildfly-booking-ear-ejb.jar:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)

              ... 15 more

       

      Is there any specific change that I need to make to deploy the EAR file in management console?

       

      Thanks,

       

      Wayne