JSP page gives ArrayIndexOutOfBoundsException in websphere for z/os

Discussion in 'Java' started by Sudhir, Aug 26, 2003.

  1. Sudhir

    Sudhir Guest

    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
     
    Sudhir, Aug 26, 2003
    #1
    1. Advertising

  2. Re: JSP page gives ArrayIndexOutOfBoundsException in websphere forz/os

    Sudhir wrote:
    > 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
     
    John C. Bollinger, Aug 27, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johan
    Replies:
    5
    Views:
    552
    Paul Lutus
    Oct 15, 2003
  2. siarsky
    Replies:
    0
    Views:
    618
    siarsky
    Dec 23, 2003
  3. Aloys Oberthuer
    Replies:
    3
    Views:
    7,691
    Aloys Oberthuer
    Apr 22, 2004
  4. Simon Bieri
    Replies:
    2
    Views:
    4,896
    Simon Bieri
    Jun 15, 2004
  5. Replies:
    3
    Views:
    2,542
    Tumbleweed
    Jul 1, 2004
Loading...

Share This Page