2 Replies Latest reply on Oct 10, 2013 5:15 AM by eddi-doe

    ClassNotFoundException

    eddi-doe

      I am using JBoss1.7.1.1 final with 2 *.war-files inside a maven-project. When I try to deploy the application, JBoss raises the following exceptions:

       

      Caused by: java.lang.NoClassDefFoundError: LEarEnrollment;

      Caused by: java.lang.ClassNotFoundException: EarEnrollment from [Module "deployment.clientServer.war:main" from Service Module Loader]

       

      The class EarEnrollment is defined in a *.jar-file that I have generated by using MATLAB deploy tool. Later, when I run the application, the class is apparently available, because the code runs without throwing an excpetion.

      The libraries are available in the WEB-INF/lib directory of the application or as modules (I tried both ways). However, none of the two solutions removes the exeption during deployment.

       

      I don't know, where the "L" in LEarEnrollment comes from. A class with the name LEarEnrollment does not exist.

      Does anyone know why I get the exeption with this strange class name during deployment? Why does the application run anyway?

       

      Any help would be very much appreciated. If neccessary, I can also provide more information about my project.

        • 1. Re: ClassNotFoundException
          sfcoy

          Hi there,

           

          Please attach the complete server.log to the discussion in order to reduce the amount of guessing we need to do. You can do that by clicking on "Use advanced editor".

           

          Also show us what the command:

           

               jar tf clientServer.war

           

          and

           

               jar tf other.war

           

          where "other.war" is the name of your second war file.

           

          Show only the output and logs for standard war deployments. We will leave the idea of using a module until later if needed.

          • 2. Re: ClassNotFoundException
            eddi-doe

            Hi there,

             

            jar tf clientServer.war returns the following:


            index.html

            META-INF/

            META-INF/MANIFEST.MF

            META-INF/maven/morpho.Ges3D/clientServer/pom.properties

            META-INF/maven/morpho.Ges3D/clientServer/pom.xml

            WEB-INF/

            WEB-INF/beans.xml

            WEB-INF/classes/

            WEB-INF/faces-config.xml

            WEB-INF/jboss-deployment-structure.xml

            WEB-INF/lib/

            WEB-INF/lib/aether-api-1.13.1.jar

            WEB-INF/lib/aether-connector-wagon-1.13.1.jar

            WEB-INF/lib/aether-impl-1.13.1.jar

            WEB-INF/lib/aether-spi-1.13.1.jar

            WEB-INF/lib/aether-util-1.13.1.jar

            WEB-INF/lib/asm-3.3.1.jar

            WEB-INF/lib/cal10n-api-0.7.4.jar

            WEB-INF/lib/commons-cli-1.1.jar

            WEB-INF/lib/commons-collections-3.2.1.jar

            WEB-INF/lib/commons-io-2.0.1.jar

            WEB-INF/lib/commons-lang-2.4.jar

            WEB-INF/lib/comparison.jar

            WEB-INF/lib/cxf-api-2.7.5.jar

            WEB-INF/lib/cxf-rt-bindings-soap-2.7.5.jar

            WEB-INF/lib/cxf-rt-bindings-xml-2.7.5.jar

            WEB-INF/lib/cxf-rt-core-2.7.5.jar

            WEB-INF/lib/cxf-rt-databinding-jaxb-2.7.5.jar

            WEB-INF/lib/cxf-rt-frontend-jaxws-2.7.5.jar

            WEB-INF/lib/cxf-rt-frontend-simple-2.7.5.jar

            WEB-INF/lib/cxf-rt-transports-http-2.7.5.jar

            WEB-INF/lib/cxf-rt-ws-addr-2.7.5.jar

            WEB-INF/lib/cxf-rt-ws-policy-2.7.5.jar

            WEB-INF/lib/cxf-tools-common-2.7.5.jar

            WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar

            WEB-INF/lib/httpcore-4.2.3.jar

            WEB-INF/lib/jaxb-impl-2.2.6.jar

            WEB-INF/lib/jaxb-xjc-2.2.6.jar

            WEB-INF/lib/jboss-ejb3-ext-api-2.0.0.jar

            WEB-INF/lib/jsoup-1.7.1.jar

            WEB-INF/lib/logback-classic-1.0.0.jar

            WEB-INF/lib/logback-core-1.0.0.jar

            WEB-INF/lib/maven-aether-provider-3.0.5.jar

            WEB-INF/lib/maven-model-3.0.5.jar

            WEB-INF/lib/maven-model-builder-3.0.5.jar

            WEB-INF/lib/maven-repository-metadata-3.0.5.jar

            WEB-INF/lib/maven-settings-3.0.5.jar

            WEB-INF/lib/maven-settings-builder-3.0.5.jar

            WEB-INF/lib/neethi-3.0.2.jar

            WEB-INF/lib/plexus-cipher-1.4.jar

            WEB-INF/lib/plexus-interpolation-1.14.jar

            WEB-INF/lib/plexus-sec-dispatcher-1.4.jar

            WEB-INF/lib/plexus-utils-2.0.6.jar

            WEB-INF/lib/serializer-2.7.1.jar

            WEB-INF/lib/shrinkwrap-resolver-api-2.0.0.jar

            WEB-INF/lib/shrinkwrap-resolver-api-maven-2.0.0.jar

            WEB-INF/lib/shrinkwrap-resolver-impl-maven-2.0.0.jar

            WEB-INF/lib/shrinkwrap-resolver-spi-2.0.0.jar

            WEB-INF/lib/shrinkwrap-resolver-spi-maven-2.0.0.jar

            WEB-INF/lib/slf4j-api-1.7.5.jar

            WEB-INF/lib/slf4j-ext-1.7.2.jar

            WEB-INF/lib/stax2-api-3.1.1.jar

            WEB-INF/lib/velocity-1.7.jar

            WEB-INF/lib/wagon-file-2.4.jar

            WEB-INF/lib/wagon-http-lightweight-2.4.jar

            WEB-INF/lib/wagon-http-shared4-2.4.jar

            WEB-INF/lib/wagon-provider-api-2.4.jar

            WEB-INF/lib/woodstox-core-asl-4.2.0.jar

            WEB-INF/lib/wsdl4j-1.6.3.jar

            WEB-INF/lib/xalan-2.7.1-1.jbossorg.jar

            WEB-INF/lib/xml-apis-1.3.04.jar

            WEB-INF/lib/xml-resolver-1.2.jar

            WEB-INF/lib/xmlschema-core-2.0.3.jar

            WEB-INF/lib/xuggle-xuggler-5.2.jar

            WEB-INF/web.xml

             

            and the same command for the other war file returns:

             

            META-INF/

            META-INF/MANIFEST.MF

            WEB-INF/

            WEB-INF/lib/

            index.html

            WEB-INF/beans.xml

            WEB-INF/faces-config.xml

            WEB-INF/lib/asm-3.3.1.jar

            WEB-INF/lib/cal10n-api-0.7.4.jar

            WEB-INF/lib/commons-collections-3.2.1.jar

            WEB-INF/lib/commons-compiler-2.6.1.jar

            WEB-INF/lib/commons-lang-2.4.jar

            WEB-INF/lib/core-common-1.2.0.jar

            WEB-INF/lib/core-logging-1.2.0.jar

            WEB-INF/lib/core-testing-1.2.0.jar

            WEB-INF/lib/cxf-api-2.6.2.jar

            WEB-INF/lib/cxf-rt-bindings-soap-2.6.2.jar

            WEB-INF/lib/cxf-rt-bindings-xml-2.6.2.jar

            WEB-INF/lib/cxf-rt-core-2.6.2.jar

            WEB-INF/lib/cxf-rt-databinding-jaxb-2.6.2.jar

            WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.2.jar

            WEB-INF/lib/cxf-rt-frontend-simple-2.6.2.jar

            WEB-INF/lib/cxf-rt-transports-http-2.6.2.jar

            WEB-INF/lib/cxf-rt-ws-addr-2.6.2.jar

            WEB-INF/lib/cxf-rt-ws-policy-2.6.2.jar

            WEB-INF/lib/cxf-tools-common-2.7.5.jar

            WEB-INF/lib/geronimo-javamail_1.4_spec-1.7.1.jar

            WEB-INF/lib/jackson-core-asl-1.9.2.jar

            WEB-INF/lib/jackson-jaxrs-1.9.2.jar

            WEB-INF/lib/jackson-mapper-asl-1.9.2.jar

            WEB-INF/lib/jackson-xc-1.9.2.jar

            WEB-INF/lib/janino-2.6.1.jar

            WEB-INF/lib/jaxb-impl-2.1.13.jar

            WEB-INF/lib/jaxb-xjc-2.1.13.jar

            WEB-INF/lib/jboss-ejb3-ext-api-2.0.0.jar

            WEB-INF/lib/jersey-core-1.17.1.jar

            WEB-INF/lib/jersey-json-1.17.1.jar

            WEB-INF/lib/jettison-1.1.jar

            WEB-INF/lib/logback-classic-1.0.7.jar

            WEB-INF/lib/logback-core-1.0.7.jar

            WEB-INF/lib/neethi-3.0.2.jar

            WEB-INF/lib/servlet-api-2.5.jar

            WEB-INF/lib/slf4j-api-1.7.2.jar

            WEB-INF/lib/slf4j-ext-1.7.2.jar

            WEB-INF/lib/stax2-api-3.1.1.jar

            WEB-INF/lib/velocity-1.7.jar

            WEB-INF/lib/woodstox-core-asl-4.1.4.jar

            WEB-INF/lib/wsdl4j-1.6.3.jar

            WEB-INF/lib/xml-resolver-1.2.jar

            WEB-INF/lib/xmlschema-core-2.0.3.jar

            WEB-INF/web.xml

            META-INF/maven/

            META-INF/maven/morpho.mcp/

            META-INF/maven/morpho.mcp/serverSimulator/

            META-INF/maven/morpho.mcp/serverSimulator/pom.xml

            META-INF/maven/morpho.mcp/serverSimulator/pom.properties

             

            The server.log can be found in the attachment of this post.