Search code examples
dependencieswicketapache-axisivy

NoClassDefFoundError XmlSchema with IVY dependency


In my Java Wicket application with Apache Ivy and JBoss I'm using a dynamic web project (Axis2). On the method

populateAxisService() throws org.apache.axis2.AxisFault

I get the following error: java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/XmlSchema

The ivy.xml contains the xmlschema dependency:

<dependency org="org.apache.ws.xmlschema" name="xmlschema-core" rev="2.0.3">
    <artifact name="xmlschema-core" ext="jar" />
</dependency>

I don't understand why I am getting the NoClassDeffFoundError, as the correct dependency is set. Did someone encounter this before? Thanks in advance


Solution

  • I don't have enough context to be sure, but I guess that the xmlschema-core jar is not added to your classpath. Probably because the packaging of this module is bundle (see its pom.xml) where somewhere you specify that you want the artifact of type jar. Change your type filtering from jar to jar,bundle and things should work then smoothly.