Raman, just a very minor thing: please don't cross post.
This issue should be on the -dev list, and i replied without looking and
it has 'jumped' to the -user list now.
OK, so I was confused by looking at the code snippet below
The CurrentWorkerContext snippet there was committed by me on Dec 18,
2006. (SVN 488559)
Yes, please send me the stack trace
Tallamraju, Raman wrote:
We aren't using the new multi-threaded aggregator. Our Jetspeed code is
2.1-dev and is from July-05-2006. The stack trace is correct. I can send
you the full stack trace if you like.
Thanks,
Raman
-----Original Message-----
From: David Sean Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 25, 2007 1:31 PM
To: Jetspeed Users List
Subject: Re: NullPointerException when calling PortletURLImpl.toString()
in websphere 6.0
Are you using the SVN head?
If the error is in the (ct instanceof Worker) block,
then it would appears that you have the new multi-threaded aggregator
enabled. However, the stack trace below doesn't quite follow.
Is that the correct stack trace?
Tallamraju, Raman wrote:
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))
--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]