You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Karolina <sa...@gmail.com> on 2008/10/11 04:39:33 UTC

NullPointerException in SchemaCompiler

Hello List,

I am getting the following NullPointerException when running the WSDL2C tool
with my WSDL files.  Any ideas what could be wrong?  I am using  version
1.5.0. (Under version 1.4.0 the tool generated the skeleton service code
without any problems.)

I have validated my WSDL files with Altova XMLSpy and have attempted to
examine them thoroughly for possible causes but no luck.

My WSDL files are attached.

The command I used to run my files:

     sh WSDL2C.sh -uri rbyteio.wsdl -ss -sd -d adb -u -o RandomByteIO

Thanks for any help!
Karolina

-----------------------------
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
   at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
   at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
   at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
   at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
   at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
   ...2 more
Caused by: java.lang.reflect.InvocationTargetException
   at java.lang.reflect.Method.invoke(libgcj.so.81)
   at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
   ...3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException:
java.lang.NullPointerException
   at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:289)
   at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
   at java.lang.reflect.Method.invoke(libgcj.so.81)
   ...4 more
Caused by: java.lang.NullPointerException
   at
org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCompiler.java:522)
   at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:381)
   at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:352)
   at
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
   ...6 more

Re: NullPointerException in SchemaCompiler

Posted by Karolina <sa...@gmail.com>.
Hi all -

I have answered my own question.

Just in case anyone else runs into this error:

My problem was that there were included WSDL files that did not include
<porttype> , <binding>, and <service> tags.  This was because they were not
defining any operations, just messages.  However, the WSDL2C tool expects
these tags to be present.  Thus I added a dummy operation, and made a
binding and service for it.

I discovered this by trying to run the tool on some of the included
individual wsdl files instead of just the "top" wsdl file that was including
several other files.

Best,
Karolina


On Fri, Oct 10, 2008 at 10:39 PM, Karolina <sa...@gmail.com> wrote:

> Hello List,
>
> I am getting the following NullPointerException when running the WSDL2C
> tool with my WSDL files.  Any ideas what could be wrong?  I am using
> version 1.5.0. (Under version 1.4.0 the tool generated the skeleton
> service code without any problems.)
>
> I have validated my WSDL files with Altova XMLSpy and have attempted to
> examine them thoroughly for possible causes but no luck.
>
> My WSDL files are attached.
>
> The command I used to run my files:
>
>      sh WSDL2C.sh -uri rbyteio.wsdl -ss -sd -d adb -u -o RandomByteIO
>
> Thanks for any help!
> Karolina
>
> -----------------------------
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>    at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
>    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>    at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:31)
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
>    at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
>    at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>    ...2 more
> Caused by: java.lang.reflect.InvocationTargetException
>    at java.lang.reflect.Method.invoke(libgcj.so.81)
>    at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
>    ...3 more
> Caused by: org.apache.axis2.schema.SchemaCompilationException:
> java.lang.NullPointerException
>    at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:289)
>    at
> org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:103)
>    at java.lang.reflect.Method.invoke(libgcj.so.81)
>    ...4 more
> Caused by: java.lang.NullPointerException
>    at
> org.apache.axis2.schema.SchemaCompiler.writeElement(SchemaCompiler.java:522)
>    at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:381)
>    at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:352)
>    at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:280)
>    ...6 more
>