Forum Discussion

AcesHigh's avatar
AcesHigh
Regular Visitor
8 years ago

MockService Sequence Dispatcher IndexOutOfBoundsException

I think I answered my own question.  It looks like SequenceMockOperationDispatcher is not thread safe and is causing the issue.

 

________________________________________________________________________________

 

I am using Soap UI to mock some SOAP services that my software (a REST service) is dependent upon.  I am running a load on my service while it's pointed to SOAP UI Mock and using JMeter to drive the load.  The test runs for a while without issue and then throws "Fri Aug 26 13:02:37 CDT 2016:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1."   The full stacktrace is at the bottom of this message, but the stacktrace seems to indicate that a Sequence dispatcher is searching outside the bounds (index 1) of the provided mock responses (size 1) for that operation.

 

The only modifications to dispatching that I have made is to a single SOAP operation, and I am using a script in that case to dispatch 2 different responses depending on request content.  All other operations have a single "Response1" response and the default Sequence dispatch selected.

 

Here is the full stacktrace.  Any ideas?

 

____________________________________________________________________________________

 

Fri Aug 26 13:02:37 CDT 2016:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(WsdlMockOperation.java:216)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:218)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:113)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:142)
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:756)
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(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.eviware.soapui.impl.support.AbstractMockOperation.getMockResponseAt(AbstractMockOperation.java:76)
at com.eviware.soapui.impl.wsdl.mock.dispatch.SequenceMockOperationDispatcher.selectMockResponse(SequenceMockOperationDispatcher.java:38)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(WsdlMockOperation.java:199)
... 16 more

 

 

 

 

 

No RepliesBe the first to reply