Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-2198

Arquillian creates WAR/EAR file containing packages with case insensitive case resulting ClassNotFoundException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      Arquillian 1.1.11.Final integration with JBoss EAP 7.0 is not working for testing REST Easy application when the packages in java code have two or more packages with same package names but in different case. E.g. having package "com.mycompany.example" & "com.myCompany.example". In this case, Arquillian builds the WAR file but while deploying, it throws exception as below:

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."myApp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myApp.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "myApp.war"
      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:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class
      at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:205)
      at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:105)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
      ... 5 more
      Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module "deployment.myApp.war: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)
      at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:201)
      ... 7 more

      ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 5) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "myApp.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myApp.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"myApp.war\"
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class
      Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module \"deployment.myApp.war:main\" from Service Module Loader]"}}
      ERROR [org.jboss.as.server] (management-handler-thread - 5) WFLYSRV0021: Deploy of deployment "myApp.war" was rolled back with the following failure message:
      {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myApp.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"myApp.war\"
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class
      Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module \"deployment.myApp.war:main\" from Service Module Loader]"}}
      INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment myApp.war (runtime-name: myApp.war) in 31ms
      INFO [org.jboss.as.controller] (management-handler-thread - 5) WFLYCTL0183: Service status report
      WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."myApp.war".POST_MODULE

      Even the latest 1.4.0.Final version of Arquillian have the same issue.

      In above case, application is build & deployed on JBoss EAP 7.0 successfully & REST API can be called. Only while running integration tests by Arquillian, JBoss throws the error as above.

      Show
      Arquillian 1.1.11.Final integration with JBoss EAP 7.0 is not working for testing REST Easy application when the packages in java code have two or more packages with same package names but in different case. E.g. having package "com.mycompany.example" & "com.my C ompany.example". In this case, Arquillian builds the WAR file but while deploying, it throws exception as below: ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."myApp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myApp.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "myApp.war" 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:205) at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:105) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147) ... 5 more Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module "deployment.myApp.war: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) at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:201) ... 7 more ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 5) WFLYCTL0013: Operation ("add") failed - address: ( [("deployment" => "myApp.war")] ) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myApp.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"myApp.war\" Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module \"deployment.myApp.war:main\" from Service Module Loader] "}} ERROR [org.jboss.as.server] (management-handler-thread - 5) WFLYSRV0021: Deploy of deployment "myApp.war" was rolled back with the following failure message: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"myApp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myApp.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"myApp.war\" Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYRS0006: Could not load JAX-RS Application class Caused by: java.lang.ClassNotFoundException: com.mycompany.example.RestApplication from [Module \"deployment.myApp.war:main\" from Service Module Loader] "}} INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment myApp.war (runtime-name: myApp.war) in 31ms INFO [org.jboss.as.controller] (management-handler-thread - 5) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."myApp.war".POST_MODULE Even the latest 1.4.0.Final version of Arquillian have the same issue. In above case, application is build & deployed on JBoss EAP 7.0 successfully & REST API can be called. Only while running integration tests by Arquillian, JBoss throws the error as above.

          Unassigned Unassigned
          saurabhcdt_jira Saurabh Kulkarni (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated: