[ 
https://issues.apache.org/jira/browse/CXF-7787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh updated CXF-7787:
-------------------------------------
    Fix Version/s: 3.1.17

> NullPointerException from wsdl2java
> -----------------------------------
>
>                 Key: CXF-7787
>                 URL: https://issues.apache.org/jira/browse/CXF-7787
>             Project: CXF
>          Issue Type: Test
>         Environment: CXF 3.2.5
> Java 8
>            Reporter: James Main
>            Assignee: Colm O hEigeartaigh
>            Priority: Major
>             Fix For: 3.2.6, 3.1.17
>
>         Attachments: LabResultsService.singleWsdl
>
>
> I am trying to generate Java code against my wsdl file using the wsdl2java 
> utility. I can't figure out where I am going wrong.
> Here is the command line arguments I am using -->
> $ ./wsdl2java.bat -d /c/Users/jmain/generated -client -exsh false -dns true 
> -dex true -validate -verbose 
> /c/Users/jmain/workspace-hub-hhcc/hub/src/main/resources/wsdl/hhcc/LabResultsService.singleWsdl
>  
> And here is the output -->
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d C:/Users/jmain/generated -client -exsh false -dns true -dex true 
> -validate -verbose 
> C:/Users/jmain/workspace-hub-hhcc/hub/src/main/resources/wsdl/hhcc/LabResultsService.singleWsdl
> wsdl2java - Apache CXF 3.2.5
> WSDLToJava Error: java.lang.NullPointerException
> org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
>         at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
>         at 
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.cxf.common.xmlschema.SchemaCollection.getSchemaByTargetNamespace(SchemaCollection.java:164)
>         at 
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding$3.resolveResource(JAXBDataBinding.java:991)
>         at 
> com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:117)
>         at 
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1081)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:657)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2056)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1012)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:623)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
>         at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
>         at 
> com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
>         at 
> javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638)
>         at 
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:1006)
>         at 
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemasForServiceInfos(JAXBDataBinding.java:729)
>         at 
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:712)
>         at 
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:441)
>         at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:723)
>         at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:267)
>         at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
>         at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
>         ... 4 more
> I've attached the WSDL file.
> Any ideas?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to