axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mole (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-610) Null pionter exception on complex schema code gen
Date Thu, 01 Nov 2007 14:35:50 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539376
] 

Michael Mole commented on AXIS2C-610:
-------------------------------------

I'm not entirely sure what the code is doing when it crashes, so I'm reluctant to provide
a patch, but the NullPointerException seems to be caused by invoking a method on a Null QName
object on line 618 of org.apache.axis2.schema.writer.CStructWriter.  I've made the following
change to code to get around it until this is fixed.

QName schemaQName = metainf.getSchemaQNameForQName(name);
String nsUri = null;
if (!(schemaQName == null))
{
        nsUri = schemaQName.getNamespaceURI();
}
if (!name.getNamespaceURI().equals(nsUri))
{
        XSLTUtils.addAttribute(model, "child-nsuri", nsUri, property);
        XSLTUtils.addAttribute(model, "child-nsprefix", getPrefixForURI(nsUri, null), property);
}

> Null pionter exception on complex schema code gen
> -------------------------------------------------
>
>                 Key: AXIS2C-610
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-610
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>         Environment: Operating System: Windows XP
> Java version:  1.5.0_06
> Axis2 Version: SNAPSHOT from 05/29/2007
> Java arguments: -XX:MaxPermSize=256m -Xms256M -Xmx256M
> WSDL2C arguments: -ss -sd -d adb -u
> Schema: AIXM-5-RC1-7024-XML-20070124
>            Reporter: Alastair Fettes
>            Priority: Minor
>         Attachments: aixm.zip
>
>
> 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:256)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2C.main(WSDL2C.java:28)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>         at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:209)
>         ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:47)
>         ... 3 more
> Caused by: org.apache.axis2.schema.SchemaCompilationException: java.lang.NullPointerException
>         at org.apache.axis2.schema.writer.CStructWriter.write(CStructWriter.java:194)
>         at org.apache.axis2.schema.SchemaCompiler.writeComplexType(SchemaCompiler.java:924)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:910)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:855)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:465)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:597)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:454)
>         at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1857)
>         at org.apache.axis2.schema.SchemaCompiler.processGroup(SchemaCompiler.java:2227)
>         at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1932)
>         at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1778)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:967)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1096)
>         at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1067)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:983)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1096)
>         at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1067)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:983)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1096)
>         at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1067)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:983)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1096)
>         at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1067)
>         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:983)
>         at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:904)
>         at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:855)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:494)
>         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:465)
>         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:300)
>         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:282)
>         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:282)
>         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:210)
>         at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:75)
>         ... 8 more
> Caused by: java.lang.NullPointerException
>         at org.apache.axis2.schema.writer.CStructWriter.addPropertyEntries(CStructWriter.java:612)
>         at org.apache.axis2.schema.writer.CStructWriter.populateInfo(CStructWriter.java:503)
>         at org.apache.axis2.schema.writer.CStructWriter.getBeanElement(CStructWriter.java:426)
>         at org.apache.axis2.schema.writer.CStructWriter.process(CStructWriter.java:315)
>         at org.apache.axis2.schema.writer.CStructWriter.write(CStructWriter.java:189)
>         ... 45 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message