Skip to main content

wsimport generate NullPointerException

4 replies [Last post]
astast69
Offline
Joined: 2006-03-22
Points: 0

Im getting a nullpointer when running wsimport.

"C:/Program Files/Java/jdk1.6.0/bin/wsimport" -p com.bredband.nexus.tr69.client.gen -keep http://192.168.23.76:8080/tr69/Prototype?WSDL
warning: src-ct.2.1: Complex Type Definition Representation Error for type 'IDREF'. When is used, the base type must be a complexType whose content type is simple, or, only if restriction is specified, a complex type with mixed content and emptiable particle, or, only if extension is specified, a simple type. 'anyType' satisfies none of these conditions.
line 317 of http://192.168.23.76:8080/tr69/Prototype?xsd=2
warning: src-ct.2.1: Complex Type Definition Representation Error for type 'IDREFS'. When is used, the base type must be a complexType whose content type is simple, or, only if restriction is specified, a complex type with mixed content and emptiable particle, or, only if extension is specified, a simple type. 'anyType' satisfies none of these conditions.
line 227 of http://192.168.23.76:8080/tr69/Prototype?xsd=2
error: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.xml.internal.xsom.impl.util.SchemaWriter.complexType(SchemaWriter.java:446)
at com.sun.xml.internal.xsom.impl.ComplexTypeImpl.visit(ComplexTypeImpl.java:237)
at com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector.addSchemaFragmentJavadoc(ClassSelector.java:388)
at com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector.access$300(ClassSelector.java:70)
at com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector$Binding.build(ClassSelector.java:164)
at com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector.executeTasks(ClassSelector.java:321)
at com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:139)
at com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:77)
at com.sun.tools.internal.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:387)
at com.sun.tools.internal.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:212)
at com.sun.tools.internal.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:67)
at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:126)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2206)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:223)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:180)
at com.sun.tools.internal.ws.processor.config.ModelInfo.buildModel(ModelInfo.java:87)
at com.sun.tools.internal.ws.processor.Processor.runModeler(Processor.java:81)
at com.sun.tools.internal.ws.wscompile.CompileTool.run(CompileTool.java:543)
at com.sun.tools.internal.ws.util.ToolBase.run(ToolBase.java:56)
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:597)
at com.sun.tools.internal.ws.Invoker.main(Invoker.java:63)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:30)

The WDSL is:
<?xml version="1.0" encoding="UTF-8" ?>

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohsuke
Offline
Joined: 2003-06-09
Points: 0

Apparently our code is failing to gracefully recover from earlier errors.

I'd really like to get this WSDL and schema so that we can reproduce the problem locally. Can you also paste the WSDL referenced from

and any other schemas that are referenced from this file, too?

astast69
Offline
Joined: 2006-03-22
Points: 0

Nice if you can look into it :-)

Here is the xml for http://192.168.23.76:8080/tr69/Prototype?wsdl=1

The other schemas is public ones you can get from internet.
















astast69
Offline
Joined: 2006-03-22
Points: 0

Grr, damn automatic smilies translation.... Now it looks like a lot of love-smilies in my xml.... And I only love you if you fix my problem ;-) <---- real smiley

kohsuke
Offline
Joined: 2003-06-09
Points: 0

Could you download all the schemas for us, pack it up in a zip file, and then file an issue to http://jax-ws.dev.java.net/issues/ ?

I really would like to get all the schemas from you, so that we know we are testing the exact same thing as you do.