0 Replies Latest reply: Jul 12, 2013 5:27 AM by 307dd2b3-8bb7-4b95-aea7-c94dece382b7 RSS

    java.lang.ClassCastException:cannot be cast to weblogic.servlet.internal.ServletRequestImpl

    307dd2b3-8bb7-4b95-aea7-c94dece382b7

      I have a filter written for XSS Filtering with a HTTPServletRequestWrapper doing the XSS Filtering. In Filter doFilter when i forward the request I'm getting a ClassCastException.

      This is the problem only when i deploy the application in weblogic 10.3. The same is working fine in Jboss.

       

      java.lang.ClassCastException: com.nokia.nols.dialog.controller.XSSFilterWrapper cannot be cast to weblogic.servlet.internal.ServletRequestImpl

              at weblogic.servlet.proxy.GenericProxyServlet.sendRequestHeaders(GenericProxyServlet.java:627)

              at weblogic.servlet.proxy.GenericProxyServlet.sendRequest(GenericProxyServlet.java:568)

              at weblogic.servlet.proxy.GenericProxyServlet.service(GenericProxyServlet.java:385)

              at weblogic.servlet.proxy.HttpProxyServlet.service(HttpProxyServlet.java:24)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

              at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)

              at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

              at com.nokia.nols.dialog.controller.NolsXssFilter.doFilter(NolsXssFilter.java:141)

              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)

              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)

              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

              at weblogic.security.service.SecurityManager.runAs(Unknown Source)

              at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)

              at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)

              at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)

              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

              at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)