I traced it down to
org.apache.jetspeed.engine.servlet.ServletRequestImpl.java:

    public Object getAttribute( String name )
    {
        Object value = null;

        // In parallel mode, first look up from the worker.

        Thread ct = Thread.currentThread();

        if (ct instanceof Worker)
        {
            value = **** CurrentWorkerContext.getAttribute(name); *****
        }

        // If no attribute found, then look up from the request
        if (null == value) 
        {
            value = getAttributeInternal(name);
        }

        return value;
    }

That's where the getAttribute call then moves to the worker thread
(Websphere's com.ibm.ws.webcontainer.srt.SRTServletRequest) which then
throws a NullPointerException.

Hope this is helpful.

Thanks,
Raman

>  -----Original Message-----
> From:         Tallamraju, Raman  
> Sent: Thursday, January 25, 2007 10:51 AM
> To:   'Jetspeed Users List'; Jetspeed Developers List
> Cc:   Siva, Jawahar; Sie, Yang; Gile, Abeba
> Subject:      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).getPortle
> tURLProvider(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&t
> hread=136143&cat=9
> http://mail-archives.apache.org/mod_mbox/cocoon-dev/200309.mbox/%3C200
> [EMAIL PROTECTED]
> http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=174
> 709&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(SRTServletR
> equest.java(Compiled Code))
> logs/bosPortal.log.1- at
> javax.servlet.ServletRequestWrapper.getAttribute(ServletRequestWrapper
> .java(Inlined Compiled Code))
> logs/bosPortal.log.1- at
> org.apache.jetspeed.engine.servlet.ServletRequestImpl.getAttribute(Ser
> vletRequestImpl.java(Compiled Code))
> logs/bosPortal.log.1- at
> org.apache.jetspeed.services.information.InformationProviderServiceImp
> l.getDynamicProvider(InformationProviderServiceImpl.java(Inlined
> Compiled Code))
> logs/bosPortal.log.1- at
> org.apache.pluto.services.information.InformationProviderAccess.getDyn
> amicProvider(InformationProviderAccess.java(Inlined Compiled Code))
> logs/bosPortal.log.1- at
> org.apache.pluto.core.impl.PortletURLImpl.toString(PortletURLImpl.java
> (Compiled Code))
> logs/bosPortal.log.1- at
> org.apache.jetspeed.container.url.impl.JetspeedPortletURL.toString(Jet
> speedPortletURL.java(Compiled Code))
> logs/bosPortal.log.1- at
> com.fmr.fimt.bosportal.portlet.portletinventory.PortletInventory.getRo
> ws(PortletInventory.java(Compiled Code))
> logs/bosPortal.log.1- at
> com.fmr.fimt.bosportal.portlet.selector.PortletSelector.getRows(Portle
> tSelector.java(Compiled Code))
> 
> 

Reply via email to