Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1121

ZK + Liferay 6.1 on Tomcat 7 - AbstractMethodError during error handling - original error swallowed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 6.0.1
    • None
    • None
    • Liferay 6.1 on Tomcat 7
      JDK7u4

      When ZK encounters an error (eg. site not found), error handling code is invoked DHtmlLayoutPortlet.handleError() which tries to include an error page. This, in case of Tomcat 7, delegates to org.apache.catalina.core.ApplicationDispatcher.include() which tries to call ServletRequest.getDispatcherType() which is a method added in Servlet API 3. But the underlying servletRequest is ZK's RenderHttpServletRequest that does not implement Servlet API 3. This causes the initial error message to be discarded and a following exception is thrown.

      java.lang.AbstractMethodError
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:529)
      at org.zkoss.web.portlet.ServletPortletDispatcher.include(ServletPortletDispatcher.java:51)
      at org.zkoss.web.portlet.Portlets.include(Portlets.java:72)
      at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.handleError(DHtmlLayoutPortlet.java:335)
      at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.doView(DHtmlLayoutPortlet.java:146)
      at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
      at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
      at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
      at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
      ...

            vincentjian vincentjian
            hattifnat hattifnat
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: