JSP page gives ArrayIndexOutOfBoundsException in websphere for z/os

S

Sudhir

Hi,
I have a jsp which list a number of records, it works perfectly
fine when i run on a NT machin using WSAD4.0.2 but when deployed on
Websphere 4.0.3 on z/os it gives a strange error. The stacktrace is
below. Can anyone tell me why this is happening and any possible
solutions to it? I am using struts too.

Error Code: 500
Target Servlet: null
Error Stack:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.String.getChars(String.java(Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java(Inlined
Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java(Inlined
Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.print(BodyContentImpl.java(Compiled
Code))
at org.apache.struts.util.ResponseUtils.writePrevious(ResponseUtils.java:181)
at org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:402)
at jsp.chargeback.potential._viewPCBList_jsp_29._jspService(_viewPCBList_jsp_29.java:4036)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:321)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:488)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:804)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:430)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:156)
at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

Any help would be appreciated

regards,
Sudhir
 
J

John C. Bollinger

Sudhir said:
Hi,
I have a jsp which list a number of records, it works perfectly
fine when i run on a NT machin using WSAD4.0.2 but when deployed on
Websphere 4.0.3 on z/os it gives a strange error. The stacktrace is
below. Can anyone tell me why this is happening and any possible
solutions to it? I am using struts too.

Error Code: 500
Target Servlet: null
Error Stack:
java.lang.ArrayIndexOutOfBoundsException
at java.lang.String.getChars(String.java(Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java(Inlined
Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java(Inlined
Compiled Code))
at org.apache.jasper.runtime.BodyContentImpl.print(BodyContentImpl.java(Compiled
Code))
at org.apache.struts.util.ResponseUtils.writePrevious(ResponseUtils.java:181)
at org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:402)
at jsp.chargeback.potential._viewPCBList_jsp_29._jspService(_viewPCBList_jsp_29.java:4036)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)

[stack trace tail removed]

Well, the API docs for String.getChars detail the conditions under which
an IndexOutOfBoundsException may occur; ArrayIndexOutOfBounds is an
IndexOutOfBoundsException, so its cause should be among those listed.
All the listed conditions are related to indices into the String or the
target array, which stands to reason given the exception class.

Without looking at the source for
jsp.chargeback.potential.viewPCBList.jsp it is impossible to pinpoint
the problem, but if you'll allow me to consult my crystal ball... let's
see... ah, ok. The infallible crystal ball tells me that your error is
related to differing default charsets in the two environments, not
specifying charsets explictly, and confusing byte counts with character
counts. There's also a corrupt Nigerian banker in your future.

(Psychic debugging services provided for entertainment purposes only;
results not warranted. :) )


John Bollinger
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top