You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Tallamraju, Raman" <Ra...@FMR.COM> on 2007/01/25 16:50:58 UTC

NullPointerException when calling PortletURLImpl.toString() in websphere 6.0

Hi All,

We're seeing some strange behavior when calling toString() on a
PortletURLImpl object. Here are the details:

We have a PortletURL class variable in one of our portlets that is set
to response.createActionURL() in this portlet's doView method. In
another method which is eventually called from doView (via a few calls
up to doViews of the parent classes), we try to call toString() on this
PortletURL object - this has been producing a NullPointerException for
us lately even though the PortletURL object itself isn't null.

We did some more digging and followed it up to Pluto's
PortletURLImpl.toString() method. This method has the following code in
it:

PortletURLProvider urlProvider =
InformationProviderAccess.getDynamicProvider(servletRequest).getPortletU
RLProvider(portletWindow);

We've identified the
InformationProviderAccess.getDynamicProvider(servletRequest) call as
being the culprit that's throwing the NullPointerException. This happens
randomly (there seems to be some evidence that supports a relation to
load - but not conclusive yet) and we don't know why. We did some
searching online and looks like other users have seen this issue in the
Websphere environment & they indicate that WAS's threading model might
have something to do with it:

http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=168&thr
ead=136143&cat=9
http://mail-archives.apache.org/mod_mbox/cocoon-dev/200309.mbox/%3C20030
916065510.4871.qmail@nagoya.betaversion.org%3E
http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=17470
9&cat=10&thread=26484&treeDisplayType=expandtree&forum=176

Have any of you seen this issue? Any pointers about the cause/solution
would be much appreciated.

Thanks,
Raman

Here's our WAS info:

IBM WebSphere Application Server - ND, 6.0.2.0
Build Number: o0526.07

This portlet happens to extend PortletSelector from Jetspeed 2.0 which
basically uses gems.browser.BrowserPortlet. Here's the relevant portion
of the stack trace:

logs/bosPortal.log.1:2007-01-23 11:11:12,274 [WebContainer : 2] ERROR
org.apache.portals.gems.browser.BrowserPortlet - : PortletInventory
processAction caused exception.
logs/bosPortal.log.1-java.lang.NullPointerException
logs/bosPortal.log.1-	at
com.ibm.ws.webcontainer.srt.SRTServletRequest.getAttribute(SRTServletReq
uest.java(Compiled Code))
logs/bosPortal.log.1-	at
javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper.j
ava(Inlined Compiled Code))
logs/bosPortal.log.1-	at
org.apache.jetspeed.engine.servlet.ServletRequestImpl.getAttribute(Servl
etRequestImpl.java(Compiled Code))
logs/bosPortal.log.1-	at
org.apache.jetspeed.services.information.InformationProviderServiceImpl.
getDynamicProvider(InformationProviderServiceImpl.java(Inlined Compiled
Code))
logs/bosPortal.log.1-	at
org.apache.pluto.services.information.InformationProviderAccess.getDynam
icProvider(InformationProviderAccess.java(Inlined Compiled Code))
logs/bosPortal.log.1-	at
org.apache.pluto.core.impl.PortletURLImpl.toString(PortletURLImpl.java(C
ompiled Code))
logs/bosPortal.log.1-	at
org.apache.jetspeed.container.url.impl.JetspeedPortletURL.toString(Jetsp
eedPortletURL.java(Compiled Code))
logs/bosPortal.log.1-	at
com.fmr.fimt.bosportal.portlet.portletinventory.PortletInventory.getRows
(PortletInventory.java(Compiled Code))
logs/bosPortal.log.1-	at
com.fmr.fimt.bosportal.portlet.selector.PortletSelector.getRows(PortletS
elector.java(Compiled Code))