从tomcat6升级到tomcat7会产生错误AbstractMethod错误

时间:2015-03-04 10:33:50

标签: java tomcat tomcat7 tomcat6 abstract-methods

我已将Tomcat版本从tomcat6升级到tomcat7以用于我的Web应用程序。单击按钮,页面上将抛出AbstractMethod错误。

以下是快照:

javax.servlet.ServletException: java.lang.AbstractMethodError
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
    com.web.console.jsp.editCDTemplate_jsp._jspService(editCDTemplate_jsp.java:203)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    com.web.console.CharsetFilter.doFilter(CharsetFilter.java:16)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)


root cause 

java.lang.AbstractMethodError
    javax.servlet.ServletRequestWrapper.isAsyncStarted(ServletRequestWrapper.java:396)
    com.web.console.jsp.editCDTemplate_jsp._jspService(editCDTemplate_jsp.java:166)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    com.web.console.CharsetFilter.doFilter(CharsetFilter.java:16)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

单击按钮时出现上述错误。只有一个按钮产生此错误。

修改 在按下按钮时,应显示以下jsp,但它会引发上述异常。 CODE SNIPPET

<console:page url="emptyPage.jsp"
       title="com.web.template">
  <console:menu>
  </console:menu>
  <console:header>
        <%if ( request.getParameter("mode").equals("edit") ) {%>
                <bean:message key="com.web.editTemplate"/>
    <%} else { %>
        <bean:message key="com.web.create"/>
    <%}%>
  </console:header>
  <console:pageBody>
        <tr><td><table width="100%"><tr><td>
         <%

      ServletContext pwgContext = getServletContext().getContext("/pwg");
      ivr_005fcallflow_005fframe_jsp.storeAdminSessionIdInContext(pwgContext, session.getId());
        WebConsoleSession webConsoleSession = (WebConsoleSession)session.getAttribute(LoginAction.WEB_CONSOLE_SESSION_KEY);
        if ( webConsoleSession != null )
              ivr_005fcallflow_005fframe_jsp.storeFPSAAdminSessionIdInContext( pwgContext, webConsoleSession.getSessionId() );
      RequestDispatcher dispatcher = pwgContext.getRequestDispatcher("/callflow");

      InvokeServletTag.FakeRequest subRequest = new InvokeServletTag.FakeRequest(request);
      if (request.getParameter("template") != null) {
          subRequest.setParameter("callFlowNumber", request.getParameter("template"));
      }
      InvokeServletTag.FakeResponse subResponse = new InvokeServletTag.FakeResponse();
      dispatcher.include(subRequest, subResponse);
      subResponse.flushTo(out);

          %>
        </td></tr></table></td></tr>
    <html:errors/>
  </console:pageBody>
</console:page>

任何人都可以帮我这个。

1 个答案:

答案 0 :(得分:1)

从构建路径中删除servlet-api, servlet, jsp-api and jasper个jar,你会看到一些编译问题,但容器会照顾它。或者,您可以编辑它们并指向新的jar文件