cancel
Showing results for 
Search instead for 
Did you mean: 

Nullpointer with Maven plugin when running tools

Peter_Liljenber
Occasional Contributor

Nullpointer with Maven plugin when running tools

I've created a test project just to try out the maven plugin (I want to run WS-I compliance test and automated WS tests during builds).
Testing the Webservices using the SOAPui project file and the maven plugin works just fine, but when I try to use the tool target for the maven plugin I get a NullPointerException.

mvn eviware:maven-soapui-plugin:tool

java.lang.NullPointerException
        at com.eviware.soapui.impl.wsdl.actions.iface.tools.wsi.WSIAnalyzeAction.generate(WSIAnalyzeAction.java:101)
        at com.eviware.soapui.impl.wsdl.actions.iface.tools.wsi.WSIAnalyzeAction.generate(WSIAnalyzeAction.java:58)
        at com.eviware.soapui.impl.wsdl.actions.iface.tools.support.AbstractToolsAction.perform(AbstractToolsAction.java:116)
        at com.eviware.soapui.tools.SoapUIToolRunner.runTool(SoapUIToolRunner.java:203)
        at com.eviware.soapui.tools.SoapUIToolRunner.runRunner(SoapUIToolRunner.java:115)
        at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:114)
        at com.eviware.soapui.maven2.ToolMojo.execute(ToolMojo.java:59)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        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:585)
        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)

Opening up the code shows us that:
AbstractToolsAction line116:
generate(initValues( ( T ) target, param ), UISupport.getToolHost(), ( T ) target );

UISupport.getToolHost() does return a NULL object. No ToolHost is set anywhere in the call chain, setting it with:
com.eviware.soapui.support.UISupport.setToolHost(new com.eviware.soapui.tools.SoapUIToolRunner());

makes the maven plugin work just fine. Is this a bug or am I doing something wrong?
3 REPLIES 3
omatzura
Super Contributor

Re: Nullpointer with Maven plugin when running tools

Hi!

it's a bug.. thanks for finding and fixing it! I'll add this appropriately in the code!

regards,

/Ole
eviware.com
Peter_Liljenber
Occasional Contributor

Re: Nullpointer with Maven plugin when running tools

Gr8. Will it be available in the next maven plugin? Release date?
omatzura
Super Contributor

Re: Nullpointer with Maven plugin when running tools

Hi Peter,

well, we have been pushing this release ahead of us for months now.. but I really hope it will be out next week by the latest.. sorry..

regards,

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
Announcements