You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Glen Mazza <gl...@gmail.com> on 2010/05/20 06:37:46 UTC

NPE setting up CXF code in Eclipse

Hello, doing an svn update to get the latest CXF code, then mvn clean
-Pfastinstall is all fine.  But subsequently running "mvn eclipse:clean
eclipse:eclipse -e -Pfastinstall" or "mvn -Psetup.eclipse -e" to set up
Eclipse (as explained here: http://cxf.apache.org/setting-up-eclipse.html)
creates this error:

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1190)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1022)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:627)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
	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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException
	at
org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:202)
	at org.apache.cxf.maven_plugin.XSDToJavaMojo.execute(XSDToJavaMojo.java:38)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 21 more
Caused by: java.lang.NullPointerException
	at
org.apache.cxf.xjc.dv.DefaultValuePlugin.updateSetter(DefaultValuePlugin.java:365)
	at
org.apache.cxf.xjc.dv.DefaultValuePlugin.run(DefaultValuePlugin.java:165)
	at
com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin.run(DefaultValuePlugin.java:59)
	at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
	at com.sun.tools.xjc.Driver.run(Driver.java:343)
	at com.sun.tools.xjc.Driver.run(Driver.java:191)
	at
org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:190)
	... 24 more

(I'm using Maven 2.2.0 and JDK 1.6.0_18.)  Anyone else getting this error or
know its solution?

Thanks,
Glen

-- 
View this message in context: http://old.nabble.com/NPE-setting-up-CXF-code-in-Eclipse-tp28617106p28617106.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: NPE setting up CXF code in Eclipse

Posted by Daniel Kulp <dk...@apache.org>.
On Saturday 19 June 2010 10:31:19 am Glen Mazza wrote:
> Problem fixed.  I upgraded to Maven 2.2.1 and also nuked my local Maven
> repository in case a file used in the build process was corrupted.   But
> the NPE while building CXF-API still occurred (I'm not sure why I said
> "mvn -Pfastinstall" worked below--I noticed today I was getting the NPE
> just running that as well.)
> 
> But the real problem seemed to be that I had the JAXB 2.2 and JAX-WS RI
> 2.2-api.jar's in my JDK's endorsed directory--removing them from the
> endorsed folder fixed the issue.

I really hate the entire Java endorsed thing.   Why Sun had to throw the 
kitchen sink into the JDK is beyond me.  :-(

Dan



> 
> Thanks,
> Glen
> 
> dkulp wrote:
> >> (I'm using Maven 2.2.0 and JDK 1.6.0_18.)  Anyone else getting this
> >> error or know its solution?
> > 
> > Definitely don't use Maven 2.2.0.   Bunch of bugs in there.  Use 2.2.1.
> > That
> > said, it shouldn't affect this.
> > 
> > Not sure what would cause this error.   Haven't seen it before.  If you
> > run
> > mvn -Psetup.eclipse a couple times, does it resolve itself?
> > 
> > Dan

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: NPE setting up CXF code in Eclipse

Posted by Glen Mazza <gl...@gmail.com>.
Problem fixed.  I upgraded to Maven 2.2.1 and also nuked my local Maven
repository in case a file used in the build process was corrupted.   But the
NPE while building CXF-API still occurred (I'm not sure why I said "mvn
-Pfastinstall" worked below--I noticed today I was getting the NPE just
running that as well.) 

But the real problem seemed to be that I had the JAXB 2.2 and JAX-WS RI
2.2-api.jar's in my JDK's endorsed directory--removing them from the
endorsed folder fixed the issue.

Thanks,
Glen


dkulp wrote:
> 
>> (I'm using Maven 2.2.0 and JDK 1.6.0_18.)  Anyone else getting this error
>> or know its solution?
> 
> Definitely don't use Maven 2.2.0.   Bunch of bugs in there.  Use 2.2.1. 
> That 
> said, it shouldn't affect this.
> 
> Not sure what would cause this error.   Haven't seen it before.  If you
> run 
> mvn -Psetup.eclipse a couple times, does it resolve itself?
> 
> Dan
> 

-- 
View this message in context: http://old.nabble.com/NPE-setting-up-CXF-code-in-Eclipse-tp28617106p28934164.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: NPE setting up CXF code in Eclipse

Posted by Daniel Kulp <dk...@apache.org>.
> (I'm using Maven 2.2.0 and JDK 1.6.0_18.)  Anyone else getting this error
> or know its solution?

Definitely don't use Maven 2.2.0.   Bunch of bugs in there.  Use 2.2.1.  That 
said, it shouldn't affect this.

Not sure what would cause this error.   Haven't seen it before.  If you run 
mvn -Psetup.eclipse a couple times, does it resolve itself?

Dan



On Thursday 20 May 2010 12:37:46 am Glen Mazza wrote:
> Hello, doing an svn update to get the latest CXF code, then mvn clean
> -Pfastinstall is all fine.  But subsequently running "mvn eclipse:clean
> eclipse:eclipse -e -Pfastinstall" or "mvn -Psetup.eclipse -e" to set up
> Eclipse (as explained here: http://cxf.apache.org/setting-up-eclipse.html)
> creates this error:
> 
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLif
> ecycleExecutor.java:703) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycl
> e(DefaultLifecycleExecutor.java:540) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(De
> faultLifecycleExecutor.java:1190) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLi
> fecycleExecutor.java:1022) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLif
> ecycleExecutor.java:627) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(D
> efaultLifecycleExecutor.java:553) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLife
> cycleExecutor.java:523) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFai
> lures(DefaultLifecycleExecutor.java:371) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Def
> aultLifecycleExecutor.java:332) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycl
> eExecutor.java:181) at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
> 9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException
> 	at
> org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJava
> Mojo.java:202) at
> org.apache.cxf.maven_plugin.XSDToJavaMojo.execute(XSDToJavaMojo.java:38)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManag
> er.java:483) at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLif
> ecycleExecutor.java:678) ... 21 more
> Caused by: java.lang.NullPointerException
> 	at
> org.apache.cxf.xjc.dv.DefaultValuePlugin.updateSetter(DefaultValuePlugin.ja
> va:365) at
> org.apache.cxf.xjc.dv.DefaultValuePlugin.run(DefaultValuePlugin.java:165)
> 	at
> com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin.run(DefaultValuePl
> ugin.java:59) at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
> 	at com.sun.tools.xjc.Driver.run(Driver.java:343)
> 	at com.sun.tools.xjc.Driver.run(Driver.java:191)
> 	at
> org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJava
> Mojo.java:190) ... 24 more
> 
> (I'm using Maven 2.2.0 and JDK 1.6.0_18.)  Anyone else getting this error
> or know its solution?
> 
> Thanks,
> Glen

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog