• Welcome to KonaKart Community Forum. Please login or sign up.
 

error encountered......plz help

Started by john_g, October 12, 2007, 07:46:20 pm

Previous topic - Next topic

john_g


Here's the error msg i found in the tomcat/log

-----------------------------------------------

2007-10-09 16:05:44 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.String.substring(String.java:1762)
   at java.lang.String.substring(String.java:1735)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:193)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
   at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
   at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
   at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
   at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
   at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
   at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
   at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
   at org.apache.jsp.WEB_002dINF.jsp.MainLayout_jsp._jspx_meth_tiles_insert_6(MainLayout_jsp.java:416)
   at org.apache.jsp.WEB_002dINF.jsp.MainLayout_jsp._jspService(MainLayout_jsp.java:156)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
   at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
   at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
   at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
   at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
   at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
   at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
   at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   at java.lang.Thread.run(Thread.java:595)
------------------------------------------------------------------------------------------------------------

Here is what it has in the mainLayout_jsp.java

------------------------------------------------------------
      if (_jspx_meth_tiles_insert_5(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t<td>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t\t");
line 156:    if (_jspx_meth_tiles_insert_6(_jspx_page_context))
        return;
      out.write("\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t</td>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t</tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<tr>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t<td>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t\t");
      if (_jspx_meth_tiles_insert_7(_jspx_page_context))
        return;



  private boolean _jspx_meth_tiles_insert_6(PageContext _jspx_page_context)
          throws Throwable {
    PageContext pageContext = _jspx_page_context;
    JspWriter out = _jspx_page_context.getOut();
    //  tiles:insert
    org.apache.struts.taglib.tiles.InsertTag _jspx_th_tiles_insert_6 = (org.apache.struts.taglib.tiles.InsertTag) _jspx_tagPool_tiles_insert_attribute_nobody.get(org.apache.struts.taglib.tiles.InsertTag.class);
    _jspx_th_tiles_insert_6.setPageContext(_jspx_page_context);
    _jspx_th_tiles_insert_6.setParent(null);
    _jspx_th_tiles_insert_6.setAttribute("leftTile6");
    int _jspx_eval_tiles_insert_6 = _jspx_th_tiles_insert_6.doStartTag();
line 416:    if (_jspx_th_tiles_insert_6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
      return true;
    _jspx_tagPool_tiles_insert_attribute_nobody.reuse(_jspx_th_tiles_insert_6);
    return false;
  }
--------------------------------------------------------------------------------------------------

Thanks in advance,

John

Brian

Hi John,

Without knowing the changes that you've made and when you get the exception it is very difficult to debug the problem. It looks like Tiles is complaining when attempting to insert a tile.

Focus on what you've changed, comparing with the working KonaKart version.

Brian

anilforum

i am getting same error ( before noticing this topic , i just added new topic for the same)
i just build war file using ant proived and copy the war file in my delpoy folder like any other war file . it get deployed successfully but on first page get this error

please advise.what else i can debug for this

anilforum

<put name="leftTile6" value=""/>

      <put name="leftTile7" value=""/>

in tiles def file this is blank , could this problem for our server ..how do i check huh ?

anilforum

i am able to remove this error
by putting reference of  empty jsp entry in tiles xml at place of ""

steps
1) create emptyContent.jsp in web-inf/jsp folder
2) replace entry in tiles-def xml example : <put name="leftTile7" value="/WEB-INF/jsp/emptyContent.jsp"/>

seems like out server or struts doesnt like "" entry

have fun
anil