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

SanitizedServletResponse can cause java.lang.NoClassDefFoundError if referenced before liferay is initialized

    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:59)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      	at com.liferay.portal.kernel.util.PropsUtil.get(PropsUtil.java:32)
      	at com.liferay.portal.kernel.servlet.SanitizedServletResponse.<clinit>(SanitizedServletResponse.java:195)
      	... 2 more
      

      similar issue to LPS-55731

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 3 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M7