Forum Discussion

sbhasin24's avatar
sbhasin24
New Contributor
5 years ago

SOAPUI Error while Starting Rest Mock service via maven mock plugin Maven plugin

Hi all,

 

We are getting an error while starting rest mock service (GET) for running test cases via maven build in command prompt. We have used the below maven plugin to start the Rest services.

It seems test cases and Rests mock are working fine but command prompt display soapui error. 

Soapui version :- 5.5

</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<executions>
<execution>
<id>run-soapui-tests</id>
<phase>integration-test</phase>
<goals>
<goal>mock</goal>
</goals>
</execution>
</executions>
<configuration>
<projectFile>project.artifactId-soapui-project.xml</projectFile>
<noBlock>true</noBlock>
</configuration>
</plugin>
</plugins>

Below error

15:28:59,681 INFO  [SoapUIMockServiceRunner] Handled request 1; [/api/PonData] with [Response 1] in [0ms] at [2020-06-23 15:28:59.665]

15:28:59,774 ERROR [SoapUI] An error occurred [java.lang.NullPointerException], see error log for details

com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.NullPointerException

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:242)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:114)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)

        at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)

        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

        at org.mortbay.jetty.Server.handle(Server.java:326)

        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)

        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:843)

        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.NullPointerException

        at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.findOperationForRequest(SoapUtils.java:215)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:192)

        ... 15 more

15:29:00,128 INFO  [SoapUIMockServiceRunner] Handled request 1; [arcgis/sharing/rest/generateToken] with [Response 1] in [0ms] at [2020-06-23 15:29:00.128]

15:29:00,188 INFO  [SoapUIMockServiceRunner] Handled request 1; [/arcgis/rest/services/EQUtilityNetwork/MapServer/100/query] with [Response 1] in [0ms] at [2020-06-23 15:29:00.187]

15:29:00,204 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK

15:29:00,209 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely

15:29:00,225 INFO  [SoapUITestCaseRunner] Assertion [Valid HTTP Status Codes] has status VALID

15:29:00,236 ERROR [SoapUI] An error occurred [java.lang.NullPointerException], see error log for details

com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.NullPointerException

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:242)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:114)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)

        at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)

        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

        at org.mortbay.jetty.Server.handle(Server.java:326)

        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)

        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:843)

        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.NullPointerException

        at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.findOperationForRequest(SoapUtils.java:215)

        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:192)

        ... 15 more

15:29:00,239 INFO  [SoapUITestCaseRunner] Finished running SoapUI testcase [syncNetworkConnectionsByDate TestCase], time taken: 1225ms, status: FINISHED

15:29:00,240 INFO  [SoapUITestCaseRunner] Project [nam.nim.customernetwork-5.0] finished with status [FINISHED] in 1323ms

 

SoapUI 5.5.0 TestCaseRunner Summary

-----------------------------

Time Taken: 1331ms

Total TestSuites: 1

Total TestCases: 1 (0 failed)

Total TestSteps: 1

Total Request Assertions: 1

Total Failed Assertions: 0

Total Exported Results: 1

15:29:00,245 ERROR [SoapUI] An error occurred [java.lang.NullPointerException], see error log for details

com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.NullPointerException

No RepliesBe the first to reply