Dennis Kieselhorst created CXF-4564:
---------------------------------------

             Summary: NPE in MavenToolErrorListener during wsdl2java code 
generation
                 Key: CXF-4564
                 URL: https://issues.apache.org/jira/browse/CXF-4564
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.6.3
         Environment: JDK 7
            Reporter: Dennis Kieselhorst


Running wsdl2java with 2.6.3 on JDK 7 causes an NPE. Everything is fine JDK 6.

{code}
[ERROR] Failed to execute goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java (wsdl-MyService.wsdl) on 
project dominic-communication: Execution wsdl-MyService.wsdl of goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java failed: 
java.lang.NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java (wsdl-RegistrarService.wsdl) 
on project MyProject: Execution wsdl-MyService.wsdl of goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java failed: 
java.lang.NullPointerException
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
wsdl-RegistrarService.wsdl of goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java failed: 
java.lang.NullPointerException
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.apache.cxf.tools.common.ToolException: 
java.lang.NullPointerException
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:308)
        at 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
        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.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:380)
        at 
org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:257)
        at 
org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:477)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        ... 20 more
Caused by: java.lang.NullPointerException
        at java.io.File.<init>(File.java:251)
        at 
org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo$MavenToolErrorListener$1.<init>(WSDL2JavaMojo.java:76)
        at 
org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo$MavenToolErrorListener.addError(WSDL2JavaMojo.java:74)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:40)
        at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:316)
        at com.sun.tools.xjc.ErrorReceiver.error(ErrorReceiver.java:94)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:405)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:304)
        at 
com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:115)
        at 
com.sun.istack.XMLStreamReaderToContentHandler.handleStartElement(XMLStreamReaderToContentHandler.java:304)
        at 
com.sun.istack.XMLStreamReaderToContentHandler.bridge(XMLStreamReaderToContentHandler.java:149)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:426)
        at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:173)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:627)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:392)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:603)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:248)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:300)
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to