• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

StringIndex Out of bounds

 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Grow a forest with seedballs and this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic