Topic
4 replies Latest Post - ‏2007-12-17T16:10:57Z by SystemAdmin
SystemAdmin
SystemAdmin
237 Posts
ACCEPTED ANSWER

Pinned topic java.lang.StringIndexOutOfBoundsException: String index out of range: -2

‏2005-08-09T13:39:10Z |
Hi guys,
I am using WebSphere Application Server. I am getting a proble in connecting to WBI - ICS (EAI). But i am able to connect between Tomcat 5.0 & WBI - ICS (EAI). Please help me in this regards
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at com.ibm.ws.webservices.engine.WebServicesFault.makeFault(WebServicesFault.java:179)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:490)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:218)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:274)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:727)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:648)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:609)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:446)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1372)
at com.ibm.ws.webservices.engine.client.Call.invoke(Call.java:1345)
at com.ibm.ws.webservices.wsif.providers.soap.WSIFOperation_SOAP.invokeSOAPRPCStyle(WSIFOperation_SOAP.java:1969)
at com.ibm.ws.webservices.wsif.providers.soap.WSIFOperation_SOAP.invokeRequestResponseOperation(WSIFOperation_SOAP.java:1637)
at com.ibm.ws.webservices.wsif.providers.soap.WSIFOperation_SOAP.executeRequestResponseOperation(WSIFOperation_SOAP.java:1056)
at com.eai.WSC_RTBL_UserAuthentication_From_PortTypeProxy.execute(WSC_RTBL_UserAuthentication_From_PortTypeProxy.java:210)
at com.eai.WSC_RTBL_UserAuthentication_From_PortTypeProxy.authenticateUser(WSC_RTBL_UserAuthentication_From_PortTypeProxy.java:86)
at struts.actions.SignInAction.authenticate(SignInAction.java:118)
at struts.actions.SignInAction.execute(SignInAction.java:43)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(String.java(Compiled Code))
at com.ibm.ws.webservices.engine.transport.http.HttpOutboundChannelConnection.sendSOAPRequest(HttpOutboundChannelConnection.java:276)
at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:326)
... 34 more
Updated on 2007-12-17T16:10:57Z at 2007-12-17T16:10:57Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    237 Posts
    ACCEPTED ANSWER

    Re: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

    ‏2006-01-11T09:20:50Z  in response to SystemAdmin
    I would also like to know the reason for this problem!
    • SystemAdmin
      SystemAdmin
      237 Posts
      ACCEPTED ANSWER

      Re: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

      ‏2006-01-23T21:23:02Z  in response to SystemAdmin
      I am really truly interested in getting a resolution for this.
      I am getting the following stack trace when I attempt to run my web application
      on WEbSphere 5.1 Test Server inside RAD 6.0.0.1 IDE. The same code runs just fine and is in Production! I am utterly baffled as to what the resolution is.
      My google search gives lots of hits for this problem, but unfortunately I do not know what the solution is! I appreciate greatly if any kind soul can give me any pointer.

      Stack Trace I get is:
      1/23/06 15:53:27:289 EST 16addb42 WebGroup E SRVE0026E: Servlet Error-String index out of range: 0: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java(Compiled Code))
      at com.ibm.ws.webcontainer.servlet.SimpleFileServlet.doGet(SimpleFileServlet.java:214)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1010)
      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
      • SystemAdmin
        SystemAdmin
        237 Posts
        ACCEPTED ANSWER

        Re: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

        ‏2007-09-06T08:49:06Z  in response to SystemAdmin
        The String is short...
        Or maybe your using a substring and it exceeded the index...
  • SystemAdmin
    SystemAdmin
    237 Posts
    ACCEPTED ANSWER

    Re: java.lang.StringIndexOutOfBoundsException: String index out of range: -2

    ‏2007-12-17T16:10:57Z  in response to SystemAdmin
    Are you running ITCAM? What monitor are you using? I am having a similar issue.