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 Carl Lefrançois <ca...@gmail.com> on 2008/03/06 21:20:53 UTC

WSDL2C CodeGenerationException

Hello group,

while attempting to use the WSDL2C tool there is a CodeGenerationException.
I am not understanding the output: can someone say if it appears to be a bug
in the code generator or a problem with the WSDL file?

What element seems to be the problem in the WSDL?  The WSDL is tested using
a validator which should imply that the structure is correct.

Do I start from the last .xsd retrieved before the exception?


output:

C:\ws\axis_svn\tools\codegen\javatool>WSDL2C.bat -uri x.wsdl -d adb -u
C:\ws\axis_svn\tools\codegen\javatool>echo off
Retrieving schema at '../../../xsd/...<snip>
<snip many more retrieving schema...>

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:265)
        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:218)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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.writer.CStructWriter.write(
CStructWriter.java:200)
        at org.apache.axis2.schema.SchemaCompiler.writeComplexType(
SchemaCompiler.java:934)
        at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:920)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
        at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
        at org.apache.axis2.schema.SchemaCompiler.processComplexContent(
SchemaCompiler.java:1126)
        at org.apache.axis2.schema.SchemaCompiler.processContentModel(
SchemaCompiler.java:1077)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:993)
        at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:914)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
        at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:977)
        at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
SchemaCompiler.java:914)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:865)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:478)
        at org.apache.axis2.schema.SchemaCompiler.process(
SchemaCompiler.java:1899)
        at org.apache.axis2.schema.SchemaCompiler.processParticle(
SchemaCompiler.java:1788)
        at org.apache.axis2.schema.SchemaCompiler.processComplexType(
SchemaCompiler.java:977)
        at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(
SchemaCompiler.java:886)
        at org.apache.axis2.schema.SchemaCompiler.processSchema(
SchemaCompiler.java:867)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:518)
        at org.apache.axis2.schema.SchemaCompiler.processElement(
SchemaCompiler.java:489)
        at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:302)
        at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
        at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
        at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:284)
        at org.apache.axis2.schema.SchemaCompiler.compile(
SchemaCompiler.java:212)
        at org.apache.axis2.schema.ExtensionUtility.invoke(
ExtensionUtility.java:80)
        ... 8 more
Caused by: java.lang.NullPointerException
        at org.apache.axis2.schema.writer.CStructWriter.addPropertyEntries(
CStructWriter.java:618)
        at org.apache.axis2.schema.writer.CStructWriter.populateInfo(
CStructWriter.java:508)
        at org.apache.axis2.schema.writer.CStructWriter.getBeanElement(
CStructWriter.java:431)
        at org.apache.axis2.schema.writer.CStructWriter.process(
CStructWriter.java:320)
        at org.apache.axis2.schema.writer.CStructWriter.write(
CStructWriter.java:195)
        ... 42 more

Re: WSDL2C CodeGenerationException

Posted by Carl Lefrançois <ca...@gmail.com>.
Hi Milinda, All

Please ignore this thread.  Dimuthu pointed out that I was using an old
version of the WSDL2C tool and with the snapshot build the WSDL compiles
with no problems.

My apologies!

Carl

Re: WSDL2C CodeGenerationException

Posted by Milinda Pathirage <mi...@gmail.com>.
Hi Carl,

It's hard to give a answer without looking at WSDL. Because this error was
generated at the Data Binding code. So can you please send the WSDL to the
list. Then it'll be easier for us to track the bug.

Thanks
Milinda


On Fri, Mar 7, 2008 at 1:50 AM, Carl Lefrançois <ca...@gmail.com>
wrote:

> Hello group,
>
> while attempting to use the WSDL2C tool there is a
> CodeGenerationException.  I am not understanding the output: can someone say
> if it appears to be a bug in the code generator or a problem with the WSDL
> file?
>
> What element seems to be the problem in the WSDL?  The WSDL is tested
> using a validator which should imply that the structure is correct.
>
> Do I start from the last .xsd retrieved before the exception?
>
>
> output:
>
> C:\ws\axis_svn\tools\codegen\javatool>WSDL2C.bat -uri x.wsdl -d adb -u
> C:\ws\axis_svn\tools\codegen\javatool>echo off
> Retrieving schema at '../../../xsd/...<snip>
> <snip many more retrieving schema...>
>
> 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:265)
>         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:218)
>         ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         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.writer.CStructWriter.write(
> CStructWriter.java:200)
>         at org.apache.axis2.schema.SchemaCompiler.writeComplexType(
> SchemaCompiler.java:934)
>         at
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
> SchemaCompiler.java:920)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(
> SchemaCompiler.java:865)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:518)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:478)
>         at org.apache.axis2.schema.SchemaCompiler.process(
> SchemaCompiler.java:1899)
>         at org.apache.axis2.schema.SchemaCompiler.processParticle(
> SchemaCompiler.java:1788)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexContent(
> SchemaCompiler.java:1126)
>         at org.apache.axis2.schema.SchemaCompiler.processContentModel(
> SchemaCompiler.java:1077)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(
> SchemaCompiler.java:993)
>         at
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
> SchemaCompiler.java:914)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(
> SchemaCompiler.java:865)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:518)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:478)
>         at org.apache.axis2.schema.SchemaCompiler.process(
> SchemaCompiler.java:1899)
>         at org.apache.axis2.schema.SchemaCompiler.processParticle(
> SchemaCompiler.java:1788)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(
> SchemaCompiler.java:977)
>         at
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(
> SchemaCompiler.java:914)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(
> SchemaCompiler.java:865)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:518)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:478)
>         at org.apache.axis2.schema.SchemaCompiler.process(
> SchemaCompiler.java:1899)
>         at org.apache.axis2.schema.SchemaCompiler.processParticle(
> SchemaCompiler.java:1788)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(
> SchemaCompiler.java:977)
>         at
> org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(
> SchemaCompiler.java:886)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(
> SchemaCompiler.java:867)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:518)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(
> SchemaCompiler.java:489)
>         at org.apache.axis2.schema.SchemaCompiler.compile(
> SchemaCompiler.java:302)
>         at org.apache.axis2.schema.SchemaCompiler.compile(
> SchemaCompiler.java:284)
>         at org.apache.axis2.schema.SchemaCompiler.compile(
> SchemaCompiler.java:284)
>         at org.apache.axis2.schema.SchemaCompiler.compile(
> SchemaCompiler.java:284)
>         at org.apache.axis2.schema.SchemaCompiler.compile(
> SchemaCompiler.java:212)
>         at org.apache.axis2.schema.ExtensionUtility.invoke(
> ExtensionUtility.java:80)
>         ... 8 more
> Caused by: java.lang.NullPointerException
>         at org.apache.axis2.schema.writer.CStructWriter.addPropertyEntries
> (CStructWriter.java:618)
>         at org.apache.axis2.schema.writer.CStructWriter.populateInfo(
> CStructWriter.java:508)
>         at org.apache.axis2.schema.writer.CStructWriter.getBeanElement(
> CStructWriter.java:431)
>         at org.apache.axis2.schema.writer.CStructWriter.process(
> CStructWriter.java:320)
>         at org.apache.axis2.schema.writer.CStructWriter.write(
> CStructWriter.java:195)
>         ... 42 more
>
>


-- 
http://inf-dimensions.blogspot.com "Infinite Dimensions"
http://wsaxc.blogspot.com "Web Services With Axis2/C"