• Post Reply Bookmark Topic Watch Topic
  • New Topic

StringIndex Out of bounds

 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
When I do too many Submits an exception occures.
When I submit once or two, three, four times all is OK.
But when I try too many submits before a response is returned I have
an java.lang.StringIndexOutOfBoundsException: String index out of range:
413
This happens only with Tomcat 3.1 or 3.2.3.
With Websphere I have an SocketException and all seems normal.
java.net.SocketException: socket closed (code=0)
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String) java.io.IOException(java.lang.String)
java.net.SocketException(java.lang.String)
int java.net.SocketInputStream.socketRead(byte [], int, int,
java.net.SocketImpl, java.io.FileDescriptor) int java.net.SocketInputStream.read(byte [], int, int)
int java.net.SocketInputStream.read()
java.lang.String java.io.DataInputStream.readLine()
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.parseHeaders(java
.io.DataInputStream)
void
com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
java.net.Socket)
void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run()
void java.lang.Thread.run()
Is this a Tomcat Bug or have we something wrong in our programms.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there is a good chance that it will be submitted several times because it's a long running process. You may need to trap it in your code. You can set up a variable, increment it and check it before actually executing the code.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a Tomcat Bug or have we something wrong in our programms.
Not to be rude, but you must definetly think that there is something wrong in your programs. You can't say it is a bug in Tomcat unless you verified that it works "OK" on other servers. Even then it is an "arguable" statement to make.
In any case, it is difficult to say either way without knowing more about your program.
regds.
- madhav
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!