0 Replies Latest reply on Jan 23, 2015 3:29 AM by Thomas Offner

    Class def not found in xmlschema-core.jar

    Thomas Offner Newbie

      Hi,

       

      I have a Maven build project with the follwoing dependency:

       

      <dependency>

         <groupId>org.apache.ws.xmlschema</groupId>

         <artifactId>xmlschema-core</artifactId>

         <version>2.0.2</version>

         <scope>provided</scope>

      </dependency>


      However when i Deploy my Application to a Default Wildfly 8.2 Installation (Runs on JDK 1.8.31) then I get the following error:


      Caused by: java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet

              .....

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_31]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_31]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_31]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:408) [rt.jar:1.8.0_31]

              at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:113) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]

              ... 139 more

      Caused by: java.lang.ClassNotFoundException: org.apache.ws.commons.schema.XmlSchemaMaxLengthFacet from [Module "deployment.myapplication.war:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

              ... 149 more

       

      However, the xmlschema-core.jar can be found in the wildfly installation folder: $WILDFLY_HOME\modules\system\layers\base\org\apache\ws\xmlschema\main

       

      When i change the dependency to:

       

      <dependency>

         <groupId>org.apache.ws.xmlschema</groupId>

         <artifactId>xmlschema-core</artifactId>

         <version>2.0.2</version>

         <!--<scope>provided</scope>-->

      </dependency>


      The ClassNotFoundException doesn't occur anymore. May this be a bug?


      Any help would be appreciated.


      Regards,

      Thomas