留言板

Internal Server Error when browsing Portal on a mobile Device

Neel Patel,修改在7 年前。

Internal Server Error when browsing Portal on a mobile Device

New Member 帖子: 3 加入日期: 15-10-27 最近的帖子
Hi,

This is my first post on the forums, I have googled this problem and browsed the forums but could not find this problem. However, I am not going to claim ignorance that it may be already reported and resolved but I was unable to find it. Also please note that we are using Liferay as a document serving and media serving outlet. All the settings have been left as default and no hooks/custom portlet have been implemented.

Problem:
When browsing the portal, I am presented with the login screen. Once logged in, I get an Internal Server Error. From here, I am still able to browse different menu options present on my home screen and navigate rest of the portal. This would suggest the problem only exist with Welcome(Homepage). When I look at the Catalina logs, the following error message is outputted.

ERROR [ajp-bio-8009-exec-37][status_jsp:753] An exception occurred processing JSP page /html/portal/layout/view/portlet.jsp at line 60__57:        String velocityTemplateContent = LayoutTemplateLocalServiceUtil.getContent(layoutTypePortlet.getLayoutTemplateId(), false, theme.getThemeId());_58: _59:  if (Validator.isNotNull(velocityTemplateContent)) {_60:                 RuntimePageUtil.processTemplate(pageContext, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));_61:        }_62: }_63: %>___Stacktrace: [Sanitized]


This problem only accurs when browsing the portal on a mobile device. I have performed a couple of troubleshooting steps.
  • Changed the theme to a different theme(currently Default-Light) but did not resolve the problem.
  • Deleted the HTML folder and replaced it from a fresh installation but no change.
  • Restarted Tomcat and the VM.
  • Copied the Welcome(home page) to a another page and navigated manually to that page and the problem exist there as well.


Sorry for my lack of knowledge and thank you in advance.

Regards,
Neel
thumbnail
David H Nebinger,修改在7 年前。

RE: Internal Server Error when browsing Portal on a mobile Device

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Is that really all you get, a single line w/o any real indication of what the error actually is?





Come meet me at the LSNA!
Neel Patel,修改在7 年前。

RE: Internal Server Error when browsing Portal on a mobile Device

New Member 帖子: 3 加入日期: 15-10-27 最近的帖子
My Apologies, it turns out I was not using my eyes...Please find the full error below. Sorry again and thank you for the prompt response.

Aug 16, 2016 12:07:26 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.AbstractMethodError
        at com.liferay.portal.kernel.mobile.device.AbstractDevice.toString(AbstractDevice.java:58)
        at java.lang.String.valueOf(String.java:2849)
        at com.liferay.util.portlet.PortletRequestUtil._isValidAttributeValue(PortletRequestUtil.java:335)
        at com.liferay.util.portlet.PortletRequestUtil.toXML(PortletRequestUtil.java:274)
        at com.liferay.portlet.journalcontent.action.ViewAction.render(ViewAction.java:75)
        at com.liferay.portal.struts.PortletAction.execute(PortletAction.java:119)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at com.liferay.portal.struts.PortletRequestProcessor.processActionPerform(PortletRequestProcessor.java:454)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:234)
        at com.liferay.portlet.StrutsPortlet.include(StrutsPortlet.java:296)
        at com.liferay.portlet.StrutsPortlet.doView(StrutsPortlet.java:157)
        at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:213)
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
        at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
        at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
        at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
        at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:597)
        at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:656)
        at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:362)
        at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1242)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
        at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
        at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
        at com.liferay.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:655)
        at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:138)
        at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:141)
        at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
        at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:156)
        at com.liferay.portal.layoutconfiguration.util.PortletRenderer._render(PortletRenderer.java:125)
        at com.liferay.portal.layoutconfiguration.util.PortletRenderer.access$4(PortletRenderer.java:107)
        at com.liferay.portal.layoutconfiguration.util.PortletRenderer$PortletRendererCallable.doCall(PortletRenderer.java:180)
        at com.liferay.portal.layoutconfiguration.util.PortletRenderer$PortletRendererCallable.doCall(PortletRenderer.java:1)
        at com.liferay.portal.kernel.executor.CopyThreadLocalCallable.call(CopyThreadLocalCallable.java:69)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
        at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
        at java.lang.Thread.run(Thread.java:745)

00:07:26,563 ERROR [ajp-bio-8009-exec-103][status_jsp:753] An exception occurred processing JSP page /html/portal/layout/view/portlet.jsp at line 60__57:       String velocityTemplateContent = LayoutTemplateLocalServiceUtil.getContent(layoutTypePortlet.getLayoutTemplateId(),
false, theme.getThemeId());_58: _59:    if (Validator.isNotNull(velocityTemplateContent)) {_60:                 RuntimePageUtil.processTemplate(pageContext, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));_61:      }_62: }_63: %>___Stacktrace: [Sanitized]
thumbnail
David H Nebinger,修改在7 年前。

RE: Internal Server Error when browsing Portal on a mobile Device

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
So what version of Liferay are you using?

So this error has been seen before, https://web.liferay.com/community/forums/-/message_boards/message/73796474, but there's not a great deal of information around it.

In checking the code I can see that the portal is in the process of turning the request and response objects into XML and at the particular point of failure it's trying to process application scope session variables; likely Liferay has injected the AbstractDevice into the session variables to represent information on the mobile device used during rendering.

It appears that Liferay is setting the AbstractDevice into the session, probably to help with mobile rendering, but cannot determine on it's own a concrete device instance to use. I did notice in the marketplace there are a number of free device recognition provider plugins available, perchance they might help Liferay determine a concrete AbstractDevice implementation for Liferay to use instead of the AbstractDevice...

Other than that, I'm not sure that there's much else I can help you with...





Come meet me at the LSNA!
Neel Patel,修改在7 年前。

RE: Internal Server Error when browsing Portal on a mobile Device (答复)

New Member 帖子: 3 加入日期: 15-10-27 最近的帖子
David,

Thanks for your suggestion.

I tried installing the Mobile Browser Device Recognition Provider app from https://web.liferay.com/marketplace/-/mp/application/70735109 but it was unsuccessful in resolving the problem.

However , I am happy to report that after some troubleshooting I discovered that it was the web content portlet on that page causing the problem. After removing the portlet, the page loads fine on my mobile phone. I suspect that it is too big to be displayed on mobile phones where it works fine on tablets

Sorry for wasting your time and thank you again for your effort.

Regards,
Neel