Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-55731

InvokerFilter calls HttpOnlyCookieServletResponse which fails to initialize due do portal class loader dependencies

    Details

      Description

      Steps to Reproduce:

      1. Create the folder abc in the Tomcat webapps folder
      2. Unzip the attached abc.zip to the abc folder under Tomcat webapps
      3. Create an abc.xml file in conf/Catalina/localhost with the content:

      <Context path="/abc" />
      

      4. Start up Tomcat

      Expected Result: Tomcat starts with no exceptions
      Actual Result: Start up Tomcat. You should see some exceptions like the following:

      Exception in thread "Thread-2" java.lang.ExceptionInInitializerError
      	at test.TestPropsUtilContextListener.run(TestPropsUtilContextListener.java:53)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
      	at com.liferay.portal.kernel.util.PropsUtil.getArray(PropsUtil.java:40)
      	at com.liferay.portal.kernel.servlet.HttpOnlyCookieServletResponse.<clinit>(HttpOnlyCookieServletResponse.java:67)
      	... 2 more
      

      You should now see the following exception in Tomcat any time you visit a page in Liferay.

      SEVERE: Servlet.service() for servlet [Friendly URL Servlet - Public] in context with path [] threw exception [Filter execution threw an exception] with root cause
      java.lang.NoClassDefFoundError: Could not initialize class com.liferay.portal.kernel.servlet.HttpOnlyCookieServletResponse
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:77)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:662)
      

      Tested in 6.2.x and Trunk
      Reproduced in 6.2.x and Trunk

      6.2.x ea6b8531e6850305d0f9867117dcddd5edbb7cdd
      Trunk 6138eb573bae7be136155f5e7cb7ece83924a30b

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                beck.liu Beck Liu
                Reporter:
                andrew.betts Andrew Betts
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 28 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M6