Foros de discusión

Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

David Grigglestone, modificado hace 12 años.

Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

New Member Mensajes: 5 Fecha de incorporación: 21/01/12 Mensajes recientes
New to Liferay and developing portlets so difficult to know where to start and get some developer input, so posting here as a starter. FYI .. I think this is a bug or design flaw, but I see discouraging messages about logging bugs .. so if someone recognises this a something that should be logged as a bug then please let me know.

I'm currently trying to develop a portlet using JBoss Errai. When run outside of a Liferay's portlet environment, the application runs fine, but when run within Liferay (6.1.0 GA1) is see the following messages:
[indent]
23:26:02,544 INFO [PortalImpl:4873] Current URL /web/guest/out.35231-25910.erraiBus generates exception: null
23:26:02,763 INFO [PortalImpl:4873] Current URL /web/guest/in.35231-25910.erraiBus?z=0 generates exception: null
[/indent]

When I search the Liferay bug tracking system I see several that are similar and most seem to refer to special characters and exceptions, but I'm not left with a clear sense of whether this is a Liferay configuration issue, a limiation of Liferay code, an underlying issue in Errai that is being poorly logged by Liferay or other (like a design flaw).

Perhaps someone can help narrow the issue down even if they don't know the correct answer?
Maybe there is some tracing that can be switch on to give more information?

I'm thinking the 4873 maybe refers to a message number? (since the code PortalImpl.java does not contain that many lines)

thanks in advance for any help you can give

PS .. I can provide the portlet war if anyone is interested in understanding the issue further.
thumbnail
David H Nebinger, modificado hace 12 años.

RE: Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
4873 is the line number, not the error code.

PortlalImpl is just reporting that the underlying code encountered an NPE in the call to your portlet.

You need to actually get to the logs that might have the full stack trace info, that's going to be the key to finding and resolving your issue.
David Grigglestone, modificado hace 12 años.

RE: Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

New Member Mensajes: 5 Fecha de incorporación: 21/01/12 Mensajes recientes
David H Nebinger:
4873 is the line number, not the error code.

PortlalImpl is just reporting that the underlying code encountered an NPE in the call to your portlet.

You need to actually get to the logs that might have the full stack trace info, that's going to be the key to finding and resolving your issue.


Hmm ... confusion abounds on my part .. I thought I'd looked at PortalImpl.java and it doesn't have >= 4873 lines of code .. also part of my question was about tracing that would show the underlying NPE trace .. I could not see the full trace in anything that was logged to disk. Drives me nuts; we have code at my company that does something similar or just prints the message of an exception .. just not helpful enough for support or dev engineers. Would b e great if there was a simple pattern to getting additional trace information on stuff like this emoticon

Do you have a direct SVN link to the PortalImpl.java version you think will have the line indicated in the log message (I'm using 6.1.0 CE GA1) .. that would be a great start.

Thanks for your help and interest .. and I'll take a look at Vaadin
David Grigglestone, modificado hace 12 años.

RE: Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

New Member Mensajes: 5 Fecha de incorporación: 21/01/12 Mensajes recientes
David H Nebinger:
4873 is the line number, not the error code.

PortlalImpl is just reporting that the underlying code encountered an NPE in the call to your portlet.

You need to actually get to the logs that might have the full stack trace info, that's going to be the key to finding and resolving your issue.


The issue is not an NPE (found through code analysis and testing) .. the "null" represents the results of e.getMessage() .. which as I indicated I think is really bad coding practice as it hides the underlying exception. I hacked the PortalImpl.java to dump the underly exception which turned out to be "com.liferay.portal.NoSuchLayoutException" (shown below).

I'm deducing that the problem I'm facing is that Liferay doesn't know what to do with the URLs that Errai uses. I did find:
  • http://www.liferay.com/community/wiki/-/wiki/Main/Friendly+URLs
  • http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper

.. but its not obvious to me what Liferay is trying to do or if configuration can fix the issue. Does anyone understand the problem or have any suggestions of things I might try?

Heres the full trace:

13:57:41,854 INFO [PortalImpl:4628] Current URL /out.43932-1816.erraiBus generates exception: null
com.liferay.portal.NoSuchLayoutException
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.getFriendlyURLLayout(LayoutLocalServiceImpl.java:945)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:84)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:102)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
at $Proxy26.getFriendlyURLLayout(Unknown Source)
at com.liferay.portal.service.LayoutLocalServiceUtil.getFriendlyURLLayout(LayoutLocalServiceUtil.java:715)
at com.liferay.portal.util.PortalImpl.getPortletFriendlyURLMapper(PortalImpl.java:2912)
at com.liferay.portal.util.PortalImpl.getLayoutActualURL(PortalImpl.java:1953)
at com.liferay.portal.util.PortalImpl.getActualURL(PortalImpl.java:769)
at com.liferay.portal.util.PortalUtil.getActualURL(PortalUtil.java:197)
at com.liferay.portal.servlet.FriendlyURLServlet.getRedirect(FriendlyURLServlet.java:242)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:401)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:298)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
thumbnail
David H Nebinger, modificado hace 12 años.

RE: Familiar "[PortalImpl:4873] Current URL .. generates exception: null"

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Oh, and you might want to check out Vaadin.com...

It is also a GWT-based framework, but they have integration paths directly within Liferay. Even if you must use Errai, there may be some things there that will help you with the integration efforts.