[jboss-jira] [JBoss JIRA] Updated: (JBPORTAL-1960) Handle more gracefully NPE in DefaultPortalCommandFactory
Thomas Heute (JIRA)
jira-events at lists.jboss.org
Fri Jul 4 15:05:04 EDT 2008
[ http://jira.jboss.com/jira/browse/JBPORTAL-1960?page=all ]
Thomas Heute updated JBPORTAL-1960:
-----------------------------------
Fix Version/s: 2.7.0 Beta1
(was: 2.7.0 Alpha1)
> Handle more gracefully NPE in DefaultPortalCommandFactory
> ---------------------------------------------------------
>
> Key: JBPORTAL-1960
> URL: http://jira.jboss.com/jira/browse/JBPORTAL-1960
> Project: JBoss Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Portal Core
> Affects Versions: 2.6.4 Final
> Reporter: Prabhat Jha
> Assigned To: Julien Viet
> Fix For: 2.7.0 Beta1
>
>
> Here is what we exchanged in mail.
> ===============
> Julien wrote:
> that kind of error is a runtime exception that is a portal programming error, there is not a real way to gracefully handle it at the portal level (since it happens in a command factory), I think the best we can do is to handle it with a request dispatch to a JSP (the ones we use for error handling inside portal).
> the following actions should be taken:
> 1/ determine what is the cause, have the DefaultPortalCommandFactory fixed to handle that kind of situation
> 2/ have that kind of error reported by a JSP as an internal error
> On Mar 21, 2008, at 6:13 PM, Prabhat Jha wrote:
> > So here is how you replicate this problem and I agree in advance that using HSQL is not right thing to do in clustering but I still think that the error should be more meaningful than NPE.
> >
> > 1. Start one node (all configuration) with portal-ha.sar deployed with HSQL as database.
> > 2. Access http://IP1:port/portal . It comes up fine.
> > 3. Start another node bound to different IP on the same machine. Start up is clean.
> > 4. Access http://IP2:port/portal. You get NPE.
> >
> > I just happened to try this configuration because I got lazy to fire up MySQL.
> >
> > Regards,
> > Prabhat
> >
> >
> > Prabhat Jha wrote:
> >> I am getting this NPE when I try to get http://localhost:8080/portal first time . I do not know what's causing this because I don't see any error in server log. This very well could be configuration error on my part but could it be an inherent bug. This is with portal-ha.sar with HSQL. Even if there is some configuration error, should not error be handled gracefully in the method throwing exception?
> >>
> >> javax.servlet.ServletException: java.lang.NullPointerException
> >> org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:276)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> >>
> >> *root cause*
> >>
> >> java.lang.NullPointerException
> >> org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:72)
> >> org.jboss.portal.core.controller.Controller.handle(Controller.java:208)
> >> org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
> >> org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:246)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
> >> org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
> >> org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
> >> org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
> >> org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
> >> org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
> >> org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
> >> org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
> >> org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
> >> org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:139)
> >> org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
> >> org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
> >> org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:250)
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list