IBM Support

Errors when Posting data to the HTTP Servelet.

Troubleshooting


Problem

Error 500: ; nested exception is: java.lang.StringIndexOutOfBoundsException when attempting to post a transaction to the Object Structure HTTP Servelet

Cause

This is caused when posting to a incorrect URL for the Servelet. These URLs are currently case sensitive.

This can also be caused by an incorrect service name in the message. This service name is also case sensitive.

Diagnosing The Problem

The following error is seen in the Maximo log file:


From SystemOut.log

1/18/11 5:39:01:453 EST] 0000017a ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "processMOS" on bean "BeanId(MAXIMO#mboejb.jar#mosservice, null)". Exception data: java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at psdi.iface.mos.MOSServiceBean.getMessageType(MOSServiceBean.java:158)
at psdi.iface.mos.MOSServiceBean.secureProcessMOSInternal(MOSServiceBean.java:129)
at psdi.iface.mos.MOSServiceBean.processMOS(MOSServiceBean.java:81)
at psdi.iface.mos.EJSLocalStatelessmosservice_43551b5c.processMOS(Unknown Source)
at psdi.iface.util.WebUtil.invokeMosEJB(WebUtil.java:471)
at psdi.iface.servlet.MOSServiceServlet.invokeEJB(MOSServiceServlet.java:217)
at psdi.iface.servlet.MOSServiceServlet.doPost(MOSServiceServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

[1/18/11 5:39:01:453 EST] 0000017a LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[1/18/11 5:39:01:468 EST] 0000017a SystemOut O 18 Jan 2011 05:39:01:453 [ERROR] Error while processing the incoming transaction
com.ibm.ejs.container.UnknownLocalException: ; nested exception is: java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at psdi.iface.mos.MOSServiceBean.getMessageType(MOSServiceBean.java:158)
at psdi.iface.mos.MOSServiceBean.secureProcessMOSInternal(MOSServiceBean.java:129)
at psdi.iface.mos.MOSServiceBean.processMOS(MOSServiceBean.java:81)
at psdi.iface.mos.EJSLocalStatelessmosservice_43551b5c.processMOS(Unknown Source)
at psdi.iface.util.WebUtil.invokeMosEJB(WebUtil.java:471)
at psdi.iface.servlet.MOSServiceServlet.invokeEJB(MOSServiceServlet.java:217)
at psdi.iface.servlet.MOSServiceServlet.doPost(MOSServiceServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by:
java.lang.StringIndexOutOfBoundsException
... 31 more
[1/18/11 5:39:01:468 EST] 0000017a WebApp E [Servlet Error]-[MOSServiceServlet]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: &#59; nested exception is: java.lang.StringIndexOutOfBoundsException
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:553)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:994)
at psdi.iface.servlet.MOSServiceServlet.doPost(MOSServiceServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)

Resolving The Problem

Make sure that the URL for the Servelet is correct, the service name you are using must be in capital letters. For instance, if you were posting data to the MXINCIDENT Object Structure Servlet the URL must be:

http://<maximo_servername>/meaweb/os/MXINCIDENT

and the message must contain and Action/Service name in the following format - example is for a Create Action.

CreateMXINCIDENT

Again this is case sensitive.

[{"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Business Unit":{"code":"BU005","label":"IoT"},"Component":"MEA: Generic","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"Version Independent","Edition":""},{"Product":{"code":"SSLKTY","label":"Tivoli Asset Management for IT"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"7.1;7.1.1;7.1.2;7.2;7.2.1","Edition":""},{"Product":{"code":"SSKTXT","label":"Tivoli Change and Configuration Management Database"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"7.1;7.1.1;7.1.2;7.2;7.2.1","Edition":""},{"Product":{"code":"SS6HJK","label":"Tivoli Service Request Manager"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"7.1;7.1.2;7.2;7.2.1","Edition":""}]

Document Information

Modified date:
17 June 2018

UID

swg21460182