cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bimargul...@gmail.com>
Subject Null Pointer trying to add an xs:choice to testutils.
Date Wed, 29 Oct 2008 21:29:38 GMT
I've got a null pointer fault in one of our maven bits by trying to
add a type as a testcase for a JIRA.

Do our poms pick up snapshots of XmlSchema? I want to make sure that
this isn't just me using some experimental XmlSchema.

/Users/benson/cxf/trunk/testutils svn diff
Index: src/main/resources/wsdl/type_test/type_test.xsd
===================================================================
--- src/main/resources/wsdl/type_test/type_test.xsd	(revision 708885)
+++ src/main/resources/wsdl/type_test/type_test.xsd	(working copy)
@@ -628,7 +628,18 @@
         <!--CORBA MAPPING BROKEN-->
         <!--attribute name="varAttrString" type="string"/-->
     </complexType>
-
+
+    <!--  sequence with a choice in it -->
+    <complexType name="SequenceWithChoice">
+	<sequence>
+	 <element name="instanceOf" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
+      <choice minOccurs="0" maxOccurs="unbounded">
+        <element name="name" type="xs:anyURI"/>
+        <element name="occurrence" type="xs:anyURI"/>
+    </choice>
+    </sequence>
+    </complexType>
+
     <!-- AllComplexType types -->
     <complexType name="EmptyAll">
         <all/>



[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException:
java.lang.RuntimeException: java.lang.NullPointerException
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
	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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException:
java.lang.RuntimeException: java.lang.NullPointerException
	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:352)
	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:249)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
	... 16 more
Caused by: org.apache.cxf.tools.common.ToolException:
java.lang.RuntimeException: java.lang.NullPointerException
	at org.apache.cxf.tools.validator.internal.WSDLRefValidator.processSchemas(WSDLRefValidator.java:133)
	at org.apache.cxf.tools.validator.internal.WSDLRefValidator.<init>(WSDLRefValidator.java:109)
	at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:123)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:201)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:1)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:133)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:238)
	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
	at org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:349)
	... 19 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
	at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1841)
	at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1577)
	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:186)
	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:431)
	at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:166)
	at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:125)
	at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:82)
	at org.apache.cxf.tools.validator.internal.WSDLRefValidator.getSchemas(WSDLRefValidator.java:115)
	at org.apache.cxf.tools.validator.internal.WSDLRefValidator.processSchemas(WSDLRefValidator.java:127)
	... 28 more
Caused by: java.lang.NullPointerException
	at org.apache.ws.commons.schema.utils.NamespaceMap.getNamespaceURI(NamespaceMap.java:47)
	at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:546)
	at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:525)
	at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1368)
	at org.apache.ws.commons.schema.SchemaBuilder.handleSequence(SchemaBuilder.java:926)
	at org.apache.ws.commons.schema.SchemaBuilder.handleComplexType(SchemaBuilder.java:620)
	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:167)
	at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:83)
	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:424)
	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:347)
	at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1839)
	... 36 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Wed Oct 29 17:05:51 EDT 2008
[INFO] Final Memory: 22M/46M
[INFO] ------------------------------------------------------------------------
/Users/benson/cxf/trunk/testutils

Mime
View raw message