You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Joe Bohn (JIRA)" <de...@geronimo.apache.org> on 2005/09/07 23:41:30 UTC

[jira] Created: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

NPE in WebManagerPortlet and ConnectorPortlet 
----------------------------------------------

         Key: GERONIMO-981
         URL: http://issues.apache.org/jira/browse/GERONIMO-981
     Project: Geronimo
        Type: Bug
  Components: console  
    Versions: 1.0-M5    
 Environment: Windows XP
    Reporter: Joe Bohn


NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by "Joe Bohn (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12322902 ] 

Joe Bohn commented on GERONIMO-981:
-----------------------------------

Exception info :
16:33:16,824 ERROR [PortletFragment] Error in Portlet
java.lang.NullPointerException
        at org.apache.geronimo.console.logmanager.WebAccessLogViewerPortlet.doVi
ew(WebAccessLogViewerPortlet.java:54)
        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
        at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218
)
        at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
.....

> NPE in WebManagerPortlet and ConnectorPortlet
> ---------------------------------------------
>
>          Key: GERONIMO-981
>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0-M5
>  Environment: Windows XP
>     Reporter: Joe Bohn

>
> NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by "Joe Bohn (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12330578 ] 

Joe Bohn commented on GERONIMO-981:
-----------------------------------

This is no longer a problem and can be closed.  I discovered subsequent to this from Aaron that I had caught an image of the code in-between dependent JIRAs and therefore the problem of the null WebManagerName is non-existent.   The code was also changed with a subsequent JIRA to avoid the potential NPE should thisever happen (although I think it currently does so without a log message .... that should be corrected in another JIRA).

> NPE in WebManagerPortlet and ConnectorPortlet
> ---------------------------------------------
>
>          Key: GERONIMO-981
>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0-M5
>  Environment: Windows XP
>     Reporter: Joe Bohn

>
> NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by "Joe Bohn (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12322903 ] 

Joe Bohn commented on GERONIMO-981:
-----------------------------------

Oops... I copied the wrong exception into the last comment (it's still related but this one is in a locally modified version of another file that is hitting the same thing).  Here is the exception from the currently checked in code:

22:33:50,874 ERROR [PortletInvokerImpl] PortletInvokerImpl.render() - Error whil
e dispatching portlet.
javax.portlet.PortletException
        at org.apache.geronimo.console.webmanager.WebManagerPortlet.doView(WebMa
nagerPortlet.java:90)
        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
        at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218
)
        at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)

..... snip .....

Caused by: java.lang.NullPointerException
        at org.apache.geronimo.console.webmanager.WebManagerPortlet.doView(WebMa
nagerPortlet.java:76)
        ... 120 more
Nested Exception is
java.lang.NullPointerException
        at org.apache.geronimo.console.webmanager.WebManagerPortlet.doView(WebMa
nagerPortlet.java:76)
        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
        at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218
)
        at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)


> NPE in WebManagerPortlet and ConnectorPortlet
> ---------------------------------------------
>
>          Key: GERONIMO-981
>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0-M5
>  Environment: Windows XP
>     Reporter: Joe Bohn

>
> NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-981?page=all ]
     
Aaron Mulder closed GERONIMO-981:
---------------------------------

    Fix Version: 1.0-M5
     Resolution: Fixed

Closed at submitter's request

> NPE in WebManagerPortlet and ConnectorPortlet
> ---------------------------------------------
>
>          Key: GERONIMO-981
>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0-M5
>  Environment: Windows XP
>     Reporter: Joe Bohn
>      Fix For: 1.0-M5

>
> NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by David Jencks <da...@yahoo.com>.
I'm not sure where this bean should be, but all the *-config.xml plans  
are obsolete and I will be removing them shortly once I check there are  
no stray references to them.

You might look in j2ee-jetty-plan.xml etc.  I thought the webmanager  
gbean was packaged in the portlet app, but I could be mistaken.

david jencks
On Sep 8, 2005, at 1:40 PM, Joe Bohn wrote:

>  Does this mean that there should be a GBean definition in  
> tomcat-config.xml and jetty-config.xml ... or that it should be  
> defined in system-plan.xml?  
>
>  I don't see a WebManager GBean defined in any of those places.  Is  
> there a way to define GBeans on the fly via some API so that they  
> aren't all defined in the plans?
>
>  It looks like r278800 modified the tomcat-config.xml and if I'm  
> reading the change correctly should have added this to  
> tomcat-config.xml ... but I don't see it in the latest file that I  
> checkout out.  I also don't see it in the jetty-config.xml (or in the  
> code change either for that matter).
>
>  Aaron Mulder wrote:        The web manager is a GBean that should be  
> present in
>> tomcat-config.xml or jetty-config.xml in the server plans.
>>
>> Aaron
>>
>> On Thu, 8 Sep 2005, Joe Bohn (JIRA) wrote:
>>
>>>     [  
>>> http://issues.apache.org/jira/browse/GERONIMO-981? 
>>> page=comments#action_12322931 ]
>>>
>>> Joe Bohn commented on GERONIMO-981:
>>> -----------------------------------
>>>
>>> Turns out that it isn't really the problem but rather an assumption  
>>> in that a call to PortletManager.getWebManagerNames will always  
>>> return at least one name.   It appears that it is returning null and  
>>> that is the cause of the exception.   Next stop is to figure out if  
>>> and when the web manager names are supposed to be set (and we should  
>>> code a bit more defensively to avoid NPE like this).
>>>
>>>
>>>> NPE in WebManagerPortlet and ConnectorPortlet
>>>> ---------------------------------------------
>>>>
>>>>          Key: GERONIMO-981
>>>>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>>>>      Project: Geronimo
>>>>         Type: Bug
>>>>   Components: console
>>>>     Versions: 1.0-M5
>>>>  Environment: Windows XP
>>>>     Reporter: Joe Bohn
>>>>
>>>> NPE attempting to get ManagerName because because of null return  
>>>> from PortletManager.getCurrentServer(..).
>>>> This same code is invoked from both the WebManagerPortlet and the  
>>>> ConnectorPortlet resulting in NPEs from each on doView().
>>>>
>>> -- 
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one of the  
>>> administrators:
>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>>>    http://www.atlassian.com/software/jira
>>>
>>>
>>>
>>
>>
>
> -- 
> Joe Bohn
> joe.bohn@earthlink.net
>
> "He is no fool who gives what he cannot keep, to gain what he cannot  
> lose."   -- Jim Elliot
>


Re: [jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by Joe Bohn <jo...@earthlink.net>.
Does this mean that there should be a GBean definition in 
tomcat-config.xml and jetty-config.xml ... or that it should be defined 
in system-plan.xml?  

I don't see a WebManager GBean defined in any of those places.  Is there 
a way to define GBeans on the fly via some API so that they aren't all 
defined in the plans?

It looks like r278800 modified the tomcat-config.xml and if I'm reading 
the change correctly should have added this to tomcat-config.xml ... but 
I don't see it in the latest file that I checkout out.  I also don't see 
it in the jetty-config.xml (or in the code change either for that matter).

Aaron Mulder wrote:

>	The web manager is a GBean that should be present in 
>tomcat-config.xml or jetty-config.xml in the server plans.
>
>Aaron
>
>On Thu, 8 Sep 2005, Joe Bohn (JIRA) wrote:
>  
>
>>    [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12322931 ] 
>>
>>Joe Bohn commented on GERONIMO-981:
>>-----------------------------------
>>
>>Turns out that it isn't really the problem but rather an assumption in that a call to PortletManager.getWebManagerNames will always return at least one name.   It appears that it is returning null and that is the cause of the exception.   Next stop is to figure out if and when the web manager names are supposed to be set (and we should code a bit more defensively to avoid NPE like this).
>>
>>    
>>
>>>NPE in WebManagerPortlet and ConnectorPortlet
>>>---------------------------------------------
>>>
>>>         Key: GERONIMO-981
>>>         URL: http://issues.apache.org/jira/browse/GERONIMO-981
>>>     Project: Geronimo
>>>        Type: Bug
>>>  Components: console
>>>    Versions: 1.0-M5
>>> Environment: Windows XP
>>>    Reporter: Joe Bohn
>>>      
>>>
>>>NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
>>>This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 
>>>      
>>>
>>-- 
>>This message is automatically generated by JIRA.
>>-
>>If you think it was sent incorrectly contact one of the administrators:
>>   http://issues.apache.org/jira/secure/Administrators.jspa
>>-
>>For more information on JIRA, see:
>>   http://www.atlassian.com/software/jira
>>
>>
>>    
>>
>
>
>  
>

-- 
Joe Bohn     
joe.bohn@earthlink.net

"He is no fool who gives what he cannot keep, to gain what he cannot lose."   -- Jim Elliot


Re: [jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	The web manager is a GBean that should be present in 
tomcat-config.xml or jetty-config.xml in the server plans.

Aaron

On Thu, 8 Sep 2005, Joe Bohn (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12322931 ] 
> 
> Joe Bohn commented on GERONIMO-981:
> -----------------------------------
> 
> Turns out that it isn't really the problem but rather an assumption in that a call to PortletManager.getWebManagerNames will always return at least one name.   It appears that it is returning null and that is the cause of the exception.   Next stop is to figure out if and when the web manager names are supposed to be set (and we should code a bit more defensively to avoid NPE like this).
> 
> > NPE in WebManagerPortlet and ConnectorPortlet
> > ---------------------------------------------
> >
> >          Key: GERONIMO-981
> >          URL: http://issues.apache.org/jira/browse/GERONIMO-981
> >      Project: Geronimo
> >         Type: Bug
> >   Components: console
> >     Versions: 1.0-M5
> >  Environment: Windows XP
> >     Reporter: Joe Bohn
> 
> >
> > NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> > This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
> 
> 

[jira] Commented: (GERONIMO-981) NPE in WebManagerPortlet and ConnectorPortlet

Posted by "Joe Bohn (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-981?page=comments#action_12322931 ] 

Joe Bohn commented on GERONIMO-981:
-----------------------------------

Turns out that it isn't really the problem but rather an assumption in that a call to PortletManager.getWebManagerNames will always return at least one name.   It appears that it is returning null and that is the cause of the exception.   Next stop is to figure out if and when the web manager names are supposed to be set (and we should code a bit more defensively to avoid NPE like this).

> NPE in WebManagerPortlet and ConnectorPortlet
> ---------------------------------------------
>
>          Key: GERONIMO-981
>          URL: http://issues.apache.org/jira/browse/GERONIMO-981
>      Project: Geronimo
>         Type: Bug
>   Components: console
>     Versions: 1.0-M5
>  Environment: Windows XP
>     Reporter: Joe Bohn

>
> NPE attempting to get ManagerName because because of null return from PortletManager.getCurrentServer(..).   
> This same code is invoked from both the WebManagerPortlet and the ConnectorPortlet resulting in NPEs from each on doView(). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira