Forum Discussion

DMcCabe's avatar
DMcCabe
Contributor
13 years ago

[C] lFailed to load project from file, when using maven ...

Trying to set up soapui to run under maven.

I have a soapui project set up in soapui pro 4.5.1 with a testsuite which runs fine using test runner and on the cli.

I have created a test mvn project and added the plugin repository and plugin to the pom.xml and pointed it to my project.xml file.

When I try to run it using "mvn eviware:maven-soapui-plugin:test" I get the following error
Any idea what I might be doing wrong.
Thanks

Patrick

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-soapui-plugin:2.5.1:test (default-cli) @ app ---
soapUI 2.5.1 Maven2 TestCase Runner
14:44:11,420 INFO [SoapUI] Added [file:/Users/patrickf/Documents/workspace/app/./ext/mysql-connector-java-5.1.22-bin.jar] to classpath
14:44:11,654 INFO [DefaultSoapUICore] initialized soapui-settings from [/Users/patrickf/soapui-settings.xml]
14:44:12,403 INFO [WsdlProject] Loaded project from [file:/Users/patrickf/DAM-soapui-project.xml]
java.lang.NullPointerException
at com.eviware.soapui.impl.support.AbstractHttpRequest.initAttachments(AbstractHttpRequest.java:100)
at com.eviware.soapui.impl.support.AbstractHttpRequest.<init>(AbstractHttpRequest.java:93)
at com.eviware.soapui.impl.rest.RestRequest.<init>(RestRequest.java:74)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.<init>(RestTestRequest.java:68)
at com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep.<init>(HttpTestRequestStep.java:80)
at com.eviware.soapui.impl.wsdl.teststeps.registry.HttpRequestStepFactory.buildTestStep(HttpRequestStepFactory.java:61)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.createTestStepFromConfig(WsdlTestCase.java:256)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.<init>(WsdlTestCase.java:81)
at com.eviware.soapui.impl.wsdl.WsdlTestSuite.<init>(WsdlTestSuite.java:63)
at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:280)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:173)
at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:41)
at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:24)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:269)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:127)
at com.eviware.soapui.maven2.TestMojo.execute(TestMojo.java:102)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
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:320)
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)

9 Replies

  • Hi!

    I was able to reproduce the issues, however as the REST API you are using is not available for us, it's a bit hard to debug this.
    It seems to be related to file attachments.
    Are you sending any file attachments or expecting a response with file attachments back?

    Does this errors only occur in the Maven plugin, or are you having the same issues when running it in the SoapUI Pro GUI as well?

    --
    Regards

    Erik
    SmartBear Sweden
  • I'm not using any attachments. Just REST requests, JDBC requests and some groovy scripts to compare values in both responses.
    I do have a http request however, which would download an image file

    ${Acquire with permissions request#Response#//WebApiServlet.Response[1]/result[1]/cdnUrl[1]}
    which would translate to
    Thu Jan 31 11:38:53 GMT 2013:DEBUG:Sending request: GET /hss/storage/adam/226152554fdc1f0764b75c31c9e798c8/les-diableretes-2010-c HTTP/1.1
    Thu Jan 31 11:38:54 GMT 2013:DEBUG:Receiving response: HTTP/1.1 200 OK
    Thu Jan 31 11:38:54 GMT 2013:DEBUG:Connection can be kept alive indefinitely
    Thu Jan 31 11:38:56 GMT 2013:WARN:Skipping document due to outline editor limit [400000], size is 2007953
    Thu Jan 31 11:38:56 GMT 2013:INFO:Got response for [Check CDN URL] in 2335ms (1505922 bytes)
    Thu Jan 31 11:39:30 GMT 2013:DEBUG:Connection closed

    No problems running these from the SOAPUI Pro gui or on the cli, runs ok also on SOAPUI free version gui. I only see this problem with the maven plugin
  • Hi!

    I see.
    Well, there is something weird going on here and I think it's a bug, so I've created an issue for this in our internal bug tracker (SOAPUI-4602).

    We'll let you know as soon as we have more information on this.

    --
    Regards

    Erik
    SmartBear Sweden
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi, this is not an issue in soapui.
    DMcCabe uses soapui 4.5.1 and maven plugin 2.5.1

    See the logs
    [INFO] --- maven-soapui-plugin:2.5.1:test (default-cli) @ app ---
    soapUI 2.5.1 Maven2 TestCase Runner


    I have been able to reproduce the problem with the 2.5.1 plugin and fix it by using the 4.5.1 plugin.

    SmartBear, could you please fix the documentation, the basic configuration example still uses the 2.5.1 version (see http://www.soapui.org/Test-Automation/m ... figuration)?
  • Thanks for notifying us of the outdated documentation - it's updated now.

    @DmcCabe, have you been able to resolve your issues? If not, let us know.

    Regards,
    Arian
    SmartBear Sweden