axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <amilasuriarach...@gmail.com>
Subject Re: [Axis2] NoClassDefFoundError while using WSDL2Java
Date Fri, 05 Oct 2007 05:27:08 GMT
Since you use adb this should not be a problem. Codegen engine try to load
all the extensions.
This seems to be a problem with loading jaxMe extension.

Amila.

On 10/4/07, Jozef Krssak <jozef.krssak@gmail.com> wrote:
>
> Hi all
> I am trying to migrate our code based on Axis to Axis2 and I am generating
> java classes from WDSL.
> I am getting the following exception:
>
> 2007-10-04 10:25:12,199 344   DEBUG [
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine ] (main) Extension
> class loading problem []
> java.lang.NoClassDefFoundError: org/apache/ws/jaxme/generator/SchemaReader
>     at java.lang.Class.getDeclaredConstructors0(Native Method)
>     at java.lang.Class.privateGetDeclaredConstructors (Class.java:2357)
>     at java.lang.Class.getConstructor0(Class.java:2671)
>     at java.lang.Class.newInstance0(Class.java:321)
>     at java.lang.Class.newInstance(Class.java:303)
>     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getObjectFromClassName(
> CodeGenerationEngine.java:312)
>     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.loadExtensions(
> CodeGenerationEngine.java:171)
>     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> CodeGenerationEngine.java :157)
>     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>
>
> To get more information about extension class name I have done small
> change in CodeGenerationEngine.getObjectFromClassName() to see content of
> parameter className. The exception happens when JaxMeExtension is loaded:
>
> 2007-10-04 10:56:05,457 343   DEBUG [
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine ] (main) Extension
> class loading problem (className:
> org.apache.axis2.wsdl.codegen.extension.JaxMeExtension) []
> java.lang.NoClassDefFoundError: org/apache/ws/jaxme/generator/SchemaReader
>     at java.lang.Class.getDeclaredConstructors0 (Native Method)
>     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
>     at java.lang.Class.getConstructor0(Class.java:2671)
>     at java.lang.Class.newInstance0(Class.java:321)
>     at java.lang.Class.newInstance (Class.java:303)
>     at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getObjectFromClassName(
> CodeGenerationEngine.java:312)
>     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.loadExtensions(
> CodeGenerationEngine.java :171)
>     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> CodeGenerationEngine.java:157)
>     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>     at org.apache.axis2.wsdl.WSDL2Java.main (WSDL2Java.java:24)
>
>
> I am able to get java classes (even if I have still other problems to
> include this Axis2 code into our existing project without compilation
> errors) but I am not sure if this exception can harm any generated java
> code. Maybe this information will be usefull for someone to fix it. I could
> not find "org/apache/ws/jaxme/generator/SchemaReader" or "
> org.apache.ws.jaxme.generator.SchemaReader" in Axis2 sources.
>
> For full information I have tested it with Axis2 1.3 and last nightly
> build and my WSDL2Java options are:
>
>                 <java classname=" org.apache.axis2.wsdl.WSDL2Java"
> fork="true">
>                     <classpath refid="axis.cp"/>
>                     <jvmarg value="-Daxis2.jalopy=false"/>
>                     <arg value="-uri"/>
>                     <arg file="@{file}"/>
>                     <arg value="--output"/>
>                     <arg file="${generated.dir}"/>
>                     <arg value="--databinding-method"/>
>                     <arg value="adb"/>
>                     <arg value="--unpack-classes"/>
>                     <arg value="--unwrap-params"/>
>                     <arg value="--noBuildXML"/>
>                 </java>
>
>
> Thanks
> --
> Jozef Krssak
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Mime
View raw message