Hi Woonsan,

We tried your fix - but unfortunately the problem still exists. Looks
like the new provider you create suffers the same fate as the old one.
We've put in your change + david's proposed change + an additional
try/catch block in his code - to see if this makes a difference.

We'll let you know shortly.

Thanks,
Raman

-----Original Message-----
From: Woonsan Ko [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 25, 2007 11:35 PM
To: Jetspeed Developers List
Subject: Re: NullPointerException when calling PortletURLImpl.toString()
in websphere 6.0


Hi all,

I'm writing to dev list instead of user list.

In my opinion, it doesn't seem to have null name parameter in
getAttribute() method.

According to Raman's stack trace and the related sources,
InformationProviderServiceImpl class
calls 
ServletRequestImpl's getAttribute() with a literal parameter, 
"org.apache.jetspeed.engine.core.DynamicInformationProvider".

Therefore, I think we can add a workaround code for WebSphere here in
InformationProviderServiceImpl.java to just ignore NullPointerException
like the following:


    public DynamicInformationProvider
getDynamicProvider(javax.servlet.http.HttpServletRequest
request)
    {
        DynamicInformationProvider provider = null;
        try
        {
            provider = (DynamicInformationProvider)
request.getAttribute("org.apache.jetspeed.engine.core.DynamicInformation
Provider");
        }
        catch (Exception e)
        {
            // some problem in WebSphere??
        }

        if (provider == null)
        {
            provider = new DynamicInformationProviderImpl(request,
servletConfig);
 
request.setAttribute("org.apache.jetspeed.engine.core.DynamicInformation
Provider",
provider);
        }

        return provider;
    }


I think it would be possible to meet another exception after the try
catch block, but I cannot
test with WebSphere 6 now.

Raman, would you test if the try catch block could be a workaround? And
please let us know.
Thanks.


Regards,

Woonsan


--- David Sean Taylor <[EMAIL PROTECTED]> wrote:

> 
> Tallamraju, Raman wrote:
> > 
> > The actual code snippet is
> > this:
> > 
> >     /**
> >      * @see
> > javax.servlet.http.HttpServletRequest#getAttribute(java.lang.String)
> >      */
> >     public Object getAttribute( String name )
> >     {
> >         ***Object value = super.getAttribute(name);***(Line 210)
> 
> Could this be caused by "name == null"?
> If so, I can add a check for
> 
> if (name == null)
>     return null;
> 
> and bypass making the super call
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



 
________________________________________________________________________
____________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to