cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: NPE when upgrade cxf-codegen-plugin from 2.3.5 to 2.7.4
Date Thu, 16 May 2013 01:41:14 GMT
We need add NPE guard before we restore original java.class.path system property, create CXF-5020[1]
to track it.

[1]https://issues.apache.org/jira/browse/CXF-5020
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

www.camelone.org : The open source integration conference: 

On 2013-5-16, at 上午8:45, zchen wrote:

> My Maven build runs wsdl2java by loading a wsdl from the maven repository.
> Using cxf-codegen-plugin 2.3.5 works (even 2.7.0 works). But 2.7.4 (in fact,
> starts with 2.7.1) give me NPE. I downloaded the latest
> apache-cxf-2.7.4-src. The stack trace seemed indicating a
> System.getProperty("java.class.path") is not set. Is there any new settings
> that is needed starting 2.7.1? Thank you for your help!
> 
> [ERROR] Failed to execute goal
> org.apache.cxf:cxf-codegen-plugin:2.7.4:wsdl2java (generate-sources) on
> project Execution generate-sources of goal
> org.apache.cxf:cxf-codegen-plugin:2.7.4:wsdl2java failed.
> NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.cxf:cxf-codegen-plugin:2.7.4:wsdl2java (generate-sources) on
> project mas-wsmodel-lineup-v2: Execution generate-sources of goal
> org.apache.cxf:cxf-codegen-plugin:2.7.4:wsdl2java failed.
> 	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:319)
> 	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:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	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
> generate-sources of goal org.apache.cxf:cxf-codegen-plugin:2.7.4:wsdl2java
> failed.
> 	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: java.lang.NullPointerException
> 	at java.util.Hashtable.put(Hashtable.java:394)
> 	at java.util.Properties.setProperty(Properties.java:143)
> 	at java.lang.System.setProperty(System.java:729)
> 	at
> org.apache.cxf.maven_plugin.ClassLoaderSwitcher.restoreClassLoader(ClassLoaderSwitcher.java:121)
> 	at
> org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:325)
> 	at
> org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:524)
> 	at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 
> Here is my parent pom snippet:
> 
>               <artifactId>cxf-codegen-plugin</artifactId>
>               <groupId>org.apache.cxf</groupId>
>               <version>2.7.4</version>
> ...
>               <configuration>
>                  <defaultOptions>
>                     <extraargs>
>                        <extraarg>-verbose</extraarg>
>                        <extraarg>-validate</extraarg>
> 
> 
> <extraarg>-xjc-Xts:style:org.apache.commons.lang.builder.ToStringStyle.DEFAULT_STYLE</extraarg>
>                     </extraargs>
>                  </defaultOptions>
>               </configuration>
>               <executions>
>                  <execution>
>                     <id>generate-sources</id>
>                     <phase>generate-sources</phase>
>                     <goals>
>                        <goal>wsdl2java</goal>
>                     </goals>
>                  </execution>
>               </executions>
> 
> Here is a snippet of child pom:
> 
>            <configuration>
> 
>               <wsdlOptions>
>                  <wsdlOption>
> 
> <wsdlLocation>http://${webserviceHost}:${webservicePort}/${webserviceWSDLLocationSuffix}</wsdlLocation>
>                     <wsdlArtifact>
> 
> <groupId>com.twc.mystro.mas.webservices.beans</groupId>
>                        <artifactId>${webserviceArtifactID}</artifactId>
>                        <version>${project.version}</version>
>                        <type>wsdl</type>
>                     </wsdlArtifact>
>                  </wsdlOption>
>               </wsdlOptions>
>            </configuration>
> 
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/NPE-when-upgrade-cxf-codegen-plugin-from-2-3-5-to-2-7-4-tp5727752.html
> Sent from the cxf-dev mailing list archive at Nabble.com.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message