14 years ago
Null Pointer Exception on Executing Project using Maven2
Hello,
I have been getting a Null Pointer Exception on trying to execute a simple SoapUI Project using Maven2 on Ubuntu. Below is my pom.xml. It loads the project and then gets NPE on execution.
here is the exception I get:
It would be great if someone can tell me what might be the reason that is causing the NPE?
thanks,
Hiren
I have been getting a Null Pointer Exception on trying to execute a simple SoapUI Project using Maven2 on Ubuntu. Below is my pom.xml. It loads the project and then gets NPE on execution.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Initial Monitoring Test</name>
<groupId>monitor</groupId>
<artifactId>monitorMobileServices</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Trying to get a test to work.</description>
- <pluginRepositories>
- <pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
- <build>
- <plugins>
- <plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>3.6</version>
- <executions>
- <execution>
<id>Mobile Services</id>
- <goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
- <configuration>
<projectFile>/home/src/test/resources/services-monitoring-soapui-project.xml</projectFile>
<host>www.x.com</host>
<outputFolder>${project.build.directory}/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>false</printReport>
- <projectProperties>
<projectProperty />
</projectProperties>
- <archive>
- <manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
here is the exception I get:
[DEBUG] -- end configuration --
[INFO] [soapui:test {execution: Mobile Services}]
soapUI 3.6 Maven2 TestCase Runner
16:03:15,773 WARN [DefaultSoapUICore] Missing folder [/home/xx/./ext] for external libraries
16:03:15,773 INFO [DefaultSoapUICore] Creating new settings at [/home/xx/soapui-settings.xml]
16:03:16,400 INFO [WsdlProject] Loaded project from [file:/home/src/test/resources/services-monitoring-soapui-project.xml]
[ERROR] java.lang.NullPointerException
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : com.eviware.soapui.maven2.TestMojo@1c63e8c
SoapUI Test(s) failed
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: SoapUI Test(s) failed
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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:616)
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.MojoFailureException: SoapUI Test(s) failed
at com.eviware.soapui.maven2.TestMojo.execute(TestMojo.java:118)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Aug 24 16:03:16 PDT 2011
[INFO] Final Memory: 17M/251M
[INFO] -------------------------------------------------
It would be great if someone can tell me what might be the reason that is causing the NPE?
thanks,
Hiren