[jboss-jira] [JBoss JIRA] (WFLY-4286) ClassNotFoundException from xmlschema-core.jar
David Lloyd (JIRA)
issues at jboss.org
Fri Jan 23 08:54:49 EST 2015
[ https://issues.jboss.org/browse/WFLY-4286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Lloyd resolved WFLY-4286.
-------------------------------
Resolution: Rejected
No, this is a usage error. WildFly does bundle this library, however it is not added to a deployment's class path by default.
You can include this dependency by adding a header like this to your MANIFEST.MF file (use the maven JAR plugin):
{noformat}
Dependencies: org.apache.ws.xmlschema
{noformat}
This will allow you to re-add the "provided" scope to your POM dependency specification.
> ClassNotFoundException from xmlschema-core.jar
> ----------------------------------------------
>
> Key: WFLY-4286
> URL: https://issues.jboss.org/browse/WFLY-4286
> Project: WildFly
> Issue Type: Bug
> Components: Class Loading
> Affects Versions: 8.2.0.Final
> Reporter: Thomas Offner
> Assignee: David Lloyd
>
> Hi,
>
> I have a Maven project (which builds a war) with the following 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?
> Regards,
> Thomas
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list