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

Unwrap servlet request is needed when WebSphere enables servlet and portlet caching

    Details

      Description

      Important note:

      This issue is verified for master and ee-6.2.x.

      Preconditions:

      1. Application server must be WebSphere >= 8.5.5.3 (that is, WAS Fix Pack installed >= 3)
      2. Deploy 6.2 portal with fix-pack >= portal-73
        OR
        Deploy master

      Steps:

      • Start WAS and ensure that servlet caching and portlet fragment caching are NOT enabled.

        In the administrative console click Servers > Server Types > WebSphere application servers > server_name > Web Container Settings > Web container.
        "Enable servlet caching" must not be marked

        In the administrative console click Servers > Server Types > WebSphere application servers > server_name > Portlet Container Settings > Portlet container.
        "Enable portlet fragment caching" must not be marked

      • In 6.2: Add a simple structure and an associated template in Web Content.
      • In master: you can add also a simple structure or using the Basic Web Content already available.
      • Add a new Web Content based on previous structure and click on Publish.

      Expected and Observed behaviour:

      The web Content is added

      • Change WAS configuration enabling servlet caching and portlet fragment caching.

        In the administrative console click Servers > Server Types > WebSphere application servers > server_name > Web Container Settings > Web container.
        "Enable servlet caching" must be marked

        In the administrative console click Servers > Server Types > WebSphere application servers > server_name > Portlet Container Settings > Portlet container.
        "Enable portlet fragment caching" must be marked

      • Restart WAS
      • In master: add log category com.liferay.portal.kernel.portlet.LiferayPortlet :: level ALL
      • Add a new Web Content based on previous structure and click on Publish.

      Expected behaviour:
      The web Content is added

      Observed behaviour:

      Java exception is shown in portal's log:
      6.2 log:

      000000d5 SystemOut     O 13:26:40,927 ERROR [WebContainer : 4][render_portlet_jsp:132] null
      java.lang.ClassCastException: [Ljava.lang.String; incompatible with java.lang.String
       at com.liferay.portlet.dynamicdatamapping.util.DDMImpl.getFields(DDMImpl.java:219)
       at com.liferay.portlet.dynamicdatamapping.util.DDMImpl.getFields(DDMImpl.java:202)
       at com.liferay.portlet.dynamicdatamapping.util.DDMImpl.getFields(DDMImpl.java:260)
       at com.liferay.portlet.dynamicdatamapping.util.DDMUtil.getFields(DDMUtil.java:73)
       at com.liferay.portlet.journal.action.ActionUtil.getContentAndImages(ActionUtil.java:276)
       at com.liferay.portlet.journal.action.EditArticleAction.updateArticle(EditArticleAction.java:638)
       at com.liferay.portlet.journal.action.EditArticleAction.processAction(EditArticleAction.java:148)
       at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:166)
       at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:218)
       at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
       at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
       at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:597)
       at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:628)
       at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:308)
       at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:389)
       at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:107)
       at com.liferay.portlet.SecurityPortletContainerWrapper.processAction(SecurityPortletContainerWrapper.java:109)
       at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:75)
       at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:115)
       at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:386)
      

      master log:

      00000134 SystemOut     O 10:57:02,617 DEBUG [WebContainer : 7][LiferayPortlet:577] com.liferay.portal.kernel.exception.PortalException: java.lang.NullPointerException
      com.liferay.portal.kernel.exception.PortalException: java.lang.NullPointerException
      	at com.liferay.journal.util.impl.JournalConverterImpl.getDDMFieldsDisplayValues(JournalConverterImpl.java:448)
      	at com.liferay.journal.util.impl.JournalConverterImpl.countFieldRepetition(JournalConverterImpl.java:360)
      	at com.liferay.journal.util.impl.JournalConverterImpl.getContent(JournalConverterImpl.java:140)
      	at com.liferay.journal.web.internal.portlet.JournalPortlet.updateArticle(JournalPortlet.java:696)
      	at com.liferay.journal.web.internal.portlet.JournalPortlet.addArticle(JournalPortlet.java:228)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      	at java.lang.reflect.Method.invoke(Method.java:508)
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:184)
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:392)
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:93)
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:249)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
      	at com.liferay.portlet.CheckboxParametersPortletFilter.doFilter(CheckboxParametersPortletFilter.java:83)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:68)
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
      	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:105)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
      	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
      	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:529)
      	at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:575)
      	at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:334)
      	at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.processAction(MonitoringInvokerPortlet.java:189)
      	at com.liferay.portlet.PortletContainerImpl._processAction(PortletContainerImpl.java:413)
      	at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:117)
      	at com.liferay.portlet.SecurityPortletContainerWrapper.processAction(SecurityPortletContainerWrapper.java:94)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
      	at java.lang.reflect.Method.invoke(Method.java:508)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler$InvokePrivilegedExceptionAction.run(DoPrivilegedHandler.java:168)
      	at java.security.AccessController.doPrivileged(AccessController.java:650)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:101)
      	at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:57)
      	at com.sun.proxy.$Proxy111.processAction(Unknown Source)
      	at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:75)
      	at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:114)
      	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:314)
      	at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:178)
      	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:75)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
      	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
      	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
      	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:568)
      	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:545)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      	at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
      	at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:562)
      	at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:255)
      	at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:100)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:303)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:122)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
      	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1385)
      	at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:194)
      	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:169)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      	at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
      	at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:562)
      	at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:255)
      	at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:100)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:336)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:303)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:344)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:268)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
      	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:260)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
      	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:122)
      	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
      	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
      	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
      	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:947)
      	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
      	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
      	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
      	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
      	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
      	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
      	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
      	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
      	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
      	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
      Caused by: java.lang.NullPointerException
      	at com.liferay.journal.util.impl.JournalConverterImpl.getDDMFieldsDisplayValues(JournalConverterImpl.java:429)
      	... 170 more
      

      Analysis

      • In 6.2:
        /portal-service/src/com/liferay/portal/service/ServiceContextFactory.java#getInstance(HttpServletRequest request)
        

        In master:

        /portal-kernel/src/com/liferay/portal/kernel/service/ServiceContextFactory.java#getInstance(HttpServletRequest request)
        

        request attributes are gotten as

        Map<String, Serializable>

      Next they are set in ServiceContext object but if String[].length == 1 the attribute is set as String instead of String[].

      • WAS' Web container caching adds a servlet request wrapper with
         com.ibm.ws.cache.servlet.CacheProxyRequest 
      • Servlet request wraps are managed in
        portal-impl/src/com/liferay/portal/util/PortalImpl.java#getUploadServletRequest(HttpServletRequest request)
        
      • But when a wrapper class does not start with "com.liferay." it is discarded.
      • Discarding the wrapper
         com.ibm.ws.cache.servlet.CacheProxyRequest 

        causes that when request attributes are gotten their values (String[]) are duplicated. So String[].length == 1 is always false and the attribute is set as String[].

      • In 6.2: When "defaultLanguageId" attribute is gotten from ServiceContext, a String is expected but String[] is instead, so ClassCastException happens.
      • In master: When "ddmFormValues" attribute is gotten from ServiceContext, a String is expected but String[] is instead, so
        String serializedDDMFormValues = GetterUtil.getString(serviceContext.getAttribute("ddmFormValues"));

        gets a "" and then Field fields attribute is empty and then NPE happens

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 21 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP5
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  7.1.X
                  Master