javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1

ZK-Tracker | jezelinside | 4 years ago
  1. 0

    ZK wraps RenderRequest to org.zkoss.web.portlet.RenderHttpServletRequest and RenderResponse to org.zkoss.web.portlet.RenderHttpServletResponse, using static getInstance() methods. It causes exceptions that go like this : 13:56:15,342 ERROR [com.liferay.portal.kernel.servlet.PortletServlet] (http--0.0.0.0-8080-2) javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1 >> at org.zkoss.web.portlet.ServletPortletDispatcher.include(ServletPortletDispatcher.java:57) [zweb-6.0.0.jar:] >> at org.zkoss.web.portlet.Portlets.include(Portlets.java:72) [zweb-6.0.0.jar:] >> at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.handleError(DHtmlLayoutPortlet.java:335) [zk-6.0.0.jar:6.0.0] >> at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.doView(DHtmlLayoutPortlet.java:146) [zk-6.0.0.jar:6.0.0] JBoss & Tomcat (when using Liferay 6.1) are affected. If we try not to use strict servlet compliance (by setting system property "-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false"), this leads to another exception wich is shown below : 14:16:58,743 ERROR [portal-web.docroot.html.portal.render_portlet_jsp] (http--0.0.0.0-8080-2) java.lang.ClassCastException: org.zkoss.web.portlet.RenderHttpServletRequest cannot be cast to javax.servlet.ServletRequestWrapper >> at org.apache.catalina.core.ApplicationFilterFactory.createFilterChain(ApplicationFilterFactory.java:164) >> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:827) >> at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:720) >> at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:657) >> 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) Workaround : As an alternative, I rewrote org.zkoss.web.portlet.RenderHttpServletRequest to use standard javax.servlet.http.HttpServletRequestWrapper. Here's my code : /** * A facade of RenderRequest that implements HttpServletRespose. * * @author tomyeh */ public class RenderHttpServletRequest implements HttpServletRequest { private final RenderRequest _req; private final HttpServletRequest _hreq; private String _enc = "UTF-8"; private final Map<String, String> _attrs = new HashMap<String, String>(8); public static HttpServletRequest getInstance(RenderRequest req) { final HttpServletRequest res; if (req instanceof HttpServletRequest) { res = (HttpServletRequest) req; } else { res = new RenderHttpServletRequest2(req); } // wraps HttpServletRequest to prevent further type checks : return new HttpServletRequestWrapper(res); } ... code unchanged after that ... } As a better alternative, RenderHttpServletRequest & RenderHttpServletResponse should inherit from (resp.) HttpServletRequestWrapper & HttpServletResponseWrapper or at least, use such wrappers in getInstance() methods.

    ZK-Tracker | 4 years ago | jezelinside
    javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  2. 0

    Liferay 6.1 + JBoss 7.1 + ZK 6 : Issue with the way RenderRequest are wrapped - ZK Forum

    zkoss.org | 7 months ago
    javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  3. 0

    ZK wraps RenderRequest to org.zkoss.web.portlet.RenderHttpServletRequest and RenderResponse to org.zkoss.web.portlet.RenderHttpServletResponse, using static getInstance() methods. It causes exceptions that go like this : 13:56:15,342 ERROR [com.liferay.portal.kernel.servlet.PortletServlet] (http--0.0.0.0-8080-2) javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1 >> at org.zkoss.web.portlet.ServletPortletDispatcher.include(ServletPortletDispatcher.java:57) [zweb-6.0.0.jar:] >> at org.zkoss.web.portlet.Portlets.include(Portlets.java:72) [zweb-6.0.0.jar:] >> at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.handleError(DHtmlLayoutPortlet.java:335) [zk-6.0.0.jar:6.0.0] >> at org.zkoss.zk.ui.http.DHtmlLayoutPortlet.doView(DHtmlLayoutPortlet.java:146) [zk-6.0.0.jar:6.0.0] JBoss & Tomcat (when using Liferay 6.1) are affected. If we try not to use strict servlet compliance (by setting system property "-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false"), this leads to another exception wich is shown below : 14:16:58,743 ERROR [portal-web.docroot.html.portal.render_portlet_jsp] (http--0.0.0.0-8080-2) java.lang.ClassCastException: org.zkoss.web.portlet.RenderHttpServletRequest cannot be cast to javax.servlet.ServletRequestWrapper >> at org.apache.catalina.core.ApplicationFilterFactory.createFilterChain(ApplicationFilterFactory.java:164) >> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:827) >> at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:720) >> at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:657) >> 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) Workaround : As an alternative, I rewrote org.zkoss.web.portlet.RenderHttpServletRequest to use standard javax.servlet.http.HttpServletRequestWrapper. Here's my code : /** * A facade of RenderRequest that implements HttpServletRespose. * * @author tomyeh */ public class RenderHttpServletRequest implements HttpServletRequest { private final RenderRequest _req; private final HttpServletRequest _hreq; private String _enc = "UTF-8"; private final Map<String, String> _attrs = new HashMap<String, String>(8); public static HttpServletRequest getInstance(RenderRequest req) { final HttpServletRequest res; if (req instanceof HttpServletRequest) { res = (HttpServletRequest) req; } else { res = new RenderHttpServletRequest2(req); } // wraps HttpServletRequest to prevent further type checks : return new HttpServletRequestWrapper(res); } ... code unchanged after that ... } As a better alternative, RenderHttpServletRequest & RenderHttpServletResponse should inherit from (resp.) HttpServletRequestWrapper & HttpServletResponseWrapper or at least, use such wrappers in getInstance() methods.

    ZK-Tracker | 4 years ago | jezelinside
    javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tomcat shows error jsp file not found. - Forums | Liferay

    liferay.com | 7 months ago
    javax.portlet.PortletException: javax.servlet.ServletException: Archivo JSP &quot;/registros/view.jsp&quot; no encontrado
  6. 0

    cannot retrieve definition for form bean null

    Google Groups | 9 years ago | aravi...@gmail.com
    javax.portlet.PortletException: javax.portlet.PortletException: javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.portlet.PortletException

      javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1: javax.portlet.PortletException: javax.servlet.ServletException: Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1

      at org.zkoss.web.portlet.ServletPortletDispatcher.include()
    2. The ZKoss Web Library
      Portlets.include
      1. org.zkoss.web.portlet.ServletPortletDispatcher.include(ServletPortletDispatcher.java:57)[zweb-6.0.0.jar:]
      2. org.zkoss.web.portlet.Portlets.include(Portlets.java:72)[zweb-6.0.0.jar:]
      2 frames
    3. ZK Kernel
      DHtmlLayoutPortlet.doView
      1. org.zkoss.zk.ui.http.DHtmlLayoutPortlet.handleError(DHtmlLayoutPortlet.java:335)[zk-6.0.0.jar:6.0.0]
      2. org.zkoss.zk.ui.http.DHtmlLayoutPortlet.doView(DHtmlLayoutPortlet.java:146)[zk-6.0.0.jar:6.0.0]
      2 frames