2 Replies Latest reply on Aug 2, 2016 4:06 PM by Alexander Lambley

    Classloading Trouble

    Alexander Lambley Newbie

      I am currently working on migrating a project to Wildfly 10 and have hit an issue with a .war that I am deploying. The deployment fails with the following MyWar.war.failed...

       

      {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"MyWar.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyWar.war\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"MyWar.war\"

          Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class a.b.c.d.e.MyWar with ClassLoader ModuleClassLoader for Module \"MyModule:main\" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: Y:\\WildFly\\wildfly-10.0.0.Final\\modules,Y:\\WildFly\\wildfly-10.0.0.Final\\modules\\system\\layers\\base))

          Caused by: java.lang.NoClassDefFoundError: javax/xml/datatype/DatatypeConfigurationException

          Caused by: java.lang.ClassNotFoundException: javax.xml.datatype.DatatypeConfigurationException from [Module \"MyModule:main\" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: Y:\\WildFly\\wildfly-10.0.0.Final\\modules,Y:\\WildFly\\wildfly-10.0.0.Final\\modules\\system\\layers\\base))]"}}

       

      MyModule is a module filled with .jars that are required for the .war. Now javax/xml/datatype is in the JRE (jre/lib/rt.jar specifically), and from this error log it seems like MyModule does not have access to it. Now I tried adding rt.jar directly to the project as a module, but when I add it as a dependency to MyModule, I get a NullPointerException...

       

      Caused by: java.lang.NullPointerException

        at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.createDDEndpoint(MetadataBuilder.java:213)

        at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:83)

        at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:42)

        at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)

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

        ... 5 more

       

      Can anyone spread some insight into this? I'm pretty naive at this and it's had me stuck for a while.

        • 1. Re: Classloading Trouble
          Tomaz Cerar Master

          how does you deployment look like?

           

          can you paste output of jar -tf <name-of-your-deployment>

          and exclude all .class files. but paste the rest.

          • 2. Re: Classloading Trouble
            Alexander Lambley Newbie

            jar -tf omitting all .class files and everything under the classes directory...

             

            META-INF/

            META-INF/MANIFEST.MF

            WEB-INF/

            WEB-INF/web.xml

            WEB-INF/classes/

            WEB-INF/wsdl/

            WEB-INF/sun-jaxws.xml

            WEB-INF/wsdl/MyWarService.wsdl

            WEB-INF/wsdl/MyWarService_schema1.xsd

            WEB-INF/wsdl/MyWarService_schema2.xsd

            WEB-INF/wsdl/MyWarService_schema3.xsd

            WEB-INF/wsdl/MyWarService_schema4.xsd

            WEB-INF/wsdl/MyWarService_schema5.xsd

            WEB-INF/wsdl/MyWarService_schema6.xsd

            index.jsp

            WEB-INF/jboss-deployment-structure.xml