[ 
https://issues.apache.org/jira/browse/CXF-5210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13742327#comment-13742327
 ] 

Daniel Kulp commented on CXF-5210:
----------------------------------


-exsh requires a true/false param. (legacy)

Thus:
{code}
<extraarg>-exsh</extraarg>
<extraarg>true</extraarg>
<extraarg>-mark-generated</extraarg>
{code}
                
> NullPointerException in cxf-codegen-plugin with -exsh option
> ------------------------------------------------------------
>
>                 Key: CXF-5210
>                 URL: https://issues.apache.org/jira/browse/CXF-5210
>             Project: CXF
>          Issue Type: Bug
>          Components: Soap Binding
>    Affects Versions: 2.7.6
>         Environment: $ mvn -v
> Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 
> 06:15:32+0400)
> Maven home: /opt/apache-maven-3.1.0
> Java version: 1.7.0_25, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_25/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.5.0-37-generic", arch: "amd64", family: "unix"
> cxf-codegen-plugin 2.7.6
> cxf-rt-bindings-soap 2.7.6
>            Reporter: Bulat Nigmatullin
>              Labels: maven
>
> [INFO] --- cxf-codegen-plugin:2.7.6:wsdl2java (generate-sources) @ 
> module-practitioners-api ---
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1.816s
> [INFO] Finished at: Fri Aug 16 08:58:41 MSK 2013
> [INFO] Final Memory: 22M/297M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java (generate-sources) on 
> project module-practitioners-api: Execution generate-sources of goal 
> org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java failed: 
> java.lang.NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java (generate-sources) on 
> project module-practitioners-api: Execution generate-sources of goal 
> org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java failed: 
> java.lang.NullPointerException
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>       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:318)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>       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:606)
>       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:414)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> generate-sources of goal org.apache.cxf:cxf-codegen-plugin:2.7.6:wsdl2java 
> failed: java.lang.NullPointerException
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>       ... 19 more
> Caused by: 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: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:427)
>       at 
> org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:310)
>       at 
> org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:524)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
>       ... 20 more
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.cxf.tools.common.toolspec.parser.Option.isInEnumArgumentValue(Option.java:202)
>       at 
> org.apache.cxf.tools.common.toolspec.parser.Option.readArgumentValue(Option.java:151)
>       at 
> org.apache.cxf.tools.common.toolspec.parser.Option.accept(Option.java:121)
>       at 
> org.apache.cxf.tools.common.toolspec.parser.OptionGroup.accept(OptionGroup.java:62)
>       at org.apache.cxf.tools.common.toolspec.parser.Form.accept(Form.java:99)
>       at 
> org.apache.cxf.tools.common.toolspec.parser.CommandLineParser.parseArguments(CommandLineParser.java:173)
>       at 
> org.apache.cxf.tools.common.toolspec.AbstractToolContainer.parseCommandLine(AbstractToolContainer.java:89)
>       at 
> org.apache.cxf.tools.common.toolspec.AbstractToolContainer.execute(AbstractToolContainer.java:178)
>       at 
> org.apache.cxf.tools.common.AbstractCXFToolContainer.execute(AbstractCXFToolContainer.java:72)
>       at 
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:410)
>       ... 27 more
> [ERROR] 
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
> Build fails with -exsh option and ok without it.
> My project configuration:
>         <pluginManagement>
>             <plugins>
>                  <plugin>
>                     <groupId>org.apache.cxf</groupId>
>                     <artifactId>cxf-codegen-plugin</artifactId>
>                     <version>${cxfVersion}</version>
>                     <dependencies>
>                         <dependency>
>                             <groupId>org.apache.cxf</groupId>
>                             <artifactId>cxf-rt-bindings-soap</artifactId>
>                             <version>${cxfVersion}</version>
>                         </dependency>
>                     </dependencies>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
> <plugin>
>                         <groupId>org.apache.cxf</groupId>
>                         <artifactId>cxf-codegen-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>generate-sources</id>
>                                 <phase>generate-sources</phase>
>                                 <configuration>
>                                     
> <sourceRoot>${project.build.sourceDirectory}</sourceRoot>
>                                     <wsdlOptions>
>                                         <wsdlOption>
>                                             
> <wsdl>${basedir}/src/main/resources/MedStaff.svc.wsdl</wsdl>
>                                             <bindingFiles>
>                                                 
> <bindingFile>${basedir}/src/main/resources/MedStaff_bindings.xjb</bindingFile>
>                                             </bindingFiles>
>                                             <extraargs>
>                                                 <extraarg>-client</extraarg>
>                                                 <extraarg>-exsh</extraarg>
>                                                 
> <extraarg>-mark-generated</extraarg>
>                                                 <extraarg>-p</extraarg>
>                                                 
> <extraarg>https://services.rosminzdrav.ru/MedStaff=ru.medlinesoft.rmis.api.practitioners.model</extraarg>
>                                                 <extraarg>-p</extraarg>
>                                                 
> <extraarg>http://schemas.datacontract.org/2004/07/MedStaffDTO=ru.medlinesoft.rmis.api.practitioners.model.dto</extraarg>
>                                                 <extraarg>-p</extraarg>
>                                                 
> <extraarg>http://schemas.microsoft.com/2003/10/Serialization/=ru.medlinesoft.rmis.api.practitioners.model.serialization</extraarg>
>                                                 <extraarg>-p</extraarg>
>                                                 
> <extraarg>http://schemas.microsoft.com/2003/10/Serialization/Arrays=ru.medlinesoft.rmis.api.practitioners.model.serialization.arrays</extraarg>
>                                                 <extraarg>-validate</extraarg>
>                                                 <extraarg>-verbose</extraarg>
>                                             </extraargs>
>                                         </wsdlOption>
>                                     </wsdlOptions>
>                                 </configuration>
>                                 <goals>
>                                     <goal>wsdl2java</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                     </plugin>

--
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