StringIndexOutOfBoundsException When Parsing HTTP Request Header

(Doc ID 987973.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Containers for J2EE - Version: 10.1.3.1.0 to 10.1.3.4.0 - Release: AS10gR3 to AS10gR3
Information in this document applies to any platform.
***Checked for relevance on 30-Nov-2011***

Symptoms

A servlet is deployed into 10.1.3.1 OC4J. When getting header attributes of an HTTP request;
 it fails with the following exception: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.checkBounds(String.java:368)
at java.lang.String.(String.java:404)
at com.evermind.server.http.EvermindHttpServletRequest.newISOString(EvermindHttpServletRequest.java:1154)
at com.evermind.server.http.EvermindHttpServletRequest.getHeaders(EvermindHttpServletRequest.java:1264)
at com.evermind.server.http.EvermindHttpServletRequest.getHeaders(EvermindHttpServletRequest.java:1208)
at _test__header._jspService(_test__header.java:56)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:701)
This exception happens when invoking the getHeaders () method of the javax.servlet.http.HttpServletRequest  interface.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms