You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "David Pankros (JIRA)" <je...@portals.apache.org> on 2005/05/03 16:28:05 UTC

[jira] Created: (JS2-254) NullPointerException in PortletSession.getPortletContext()

NullPointerException in PortletSession.getPortletContext()
----------------------------------------------------------

         Key: JS2-254
         URL: http://issues.apache.org/jira/browse/JS2-254
     Project: Jetspeed 2
        Type: Bug
  Components: Container  
    Versions: 2.0-dev/cvs    
 Environment: WindowsXP SP2, JBoss 4.0.1SP1, HSQL
    Reporter: David Pankros


>From a JSR168 portlet's render method, calling:
request.getPortletSession().getPortletContext();

generates the following exception:
java.lang.NullPointerException
	at org.apache.pluto.core.impl.PortletSessionImpl.getInternalPortletContext(PortletSessionImpl.java:242)
	at org.apache.pluto.core.impl.PortletSessionImpl.getPortletContext(PortletSessionImpl.java:199)
        ... portlet code ...
	at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
	at org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:96)
	at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:224)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

This was confirmed by Ate Douma on the jetspeed-users list. His explanation is:
...[I] already have traced down the cause.

The bad news:
This isn't something new but a missing implementation of a Pluto object model interface, namely:
  PortletEntity.getPortletApplicationEntity() (which returns null in Jetspeed).

After scanning the Pluto container sources, this is the *only* place this method is invoked at all (in the container that is) and we must have simply overlooked it.
What Pluto actually does (in PortletSessionImpl.getInternalPortletContext) is trying to get to the current PortletApplicationDefinition:
  portletEntity.getPortletApplicationEntity().getPortletApplicationDefinition()
This could just as well have been written as:
  portletEntity.getPortletDefinition().getPortletApplicationDefinition()
which *is* implemented in Jetspeed.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (JS2-254) NullPointerException in PortletSession.getPortletContext()

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-254?page=all ]

David Sean Taylor reassigned JS2-254:
-------------------------------------

    Assign To: David Sean Taylor

> NullPointerException in PortletSession.getPortletContext()
> ----------------------------------------------------------
>
>          Key: JS2-254
>          URL: http://issues.apache.org/jira/browse/JS2-254
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Container
>     Versions: 2.0-dev/cvs
>  Environment: WindowsXP SP2, JBoss 4.0.1SP1, HSQL
>     Reporter: David Pankros
>     Assignee: David Sean Taylor

>
> From a JSR168 portlet's render method, calling:
> request.getPortletSession().getPortletContext();
> generates the following exception:
> java.lang.NullPointerException
> 	at org.apache.pluto.core.impl.PortletSessionImpl.getInternalPortletContext(PortletSessionImpl.java:242)
> 	at org.apache.pluto.core.impl.PortletSessionImpl.getPortletContext(PortletSessionImpl.java:199)
>         ... portlet code ...
> 	at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
> 	at org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:96)
> 	at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:224)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> This was confirmed by Ate Douma on the jetspeed-users list. His explanation is:
> ...[I] already have traced down the cause.
> The bad news:
> This isn't something new but a missing implementation of a Pluto object model interface, namely:
>   PortletEntity.getPortletApplicationEntity() (which returns null in Jetspeed).
> After scanning the Pluto container sources, this is the *only* place this method is invoked at all (in the container that is) and we must have simply overlooked it.
> What Pluto actually does (in PortletSessionImpl.getInternalPortletContext) is trying to get to the current PortletApplicationDefinition:
>   portletEntity.getPortletApplicationEntity().getPortletApplicationDefinition()
> This could just as well have been written as:
>   portletEntity.getPortletDefinition().getPortletApplicationDefinition()
> which *is* implemented in Jetspeed.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (JS2-254) NullPointerException in PortletSession.getPortletContext()

Posted by "David Sean Taylor (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-254?page=all ]
     
David Sean Taylor resolved JS2-254:
-----------------------------------

    Resolution: Fixed

patch applied and captured in pluto-1.0-svn-169718.jar, 
jetspeed-2 dependencies updated

please retest, if passes could you close the issue?

thanks,

David


> NullPointerException in PortletSession.getPortletContext()
> ----------------------------------------------------------
>
>          Key: JS2-254
>          URL: http://issues.apache.org/jira/browse/JS2-254
>      Project: Jetspeed 2
>         Type: Bug
>   Components: Container
>     Versions: 2.0-dev/cvs
>  Environment: WindowsXP SP2, JBoss 4.0.1SP1, HSQL
>     Reporter: David Pankros
>     Assignee: David Sean Taylor

>
> From a JSR168 portlet's render method, calling:
> request.getPortletSession().getPortletContext();
> generates the following exception:
> java.lang.NullPointerException
> 	at org.apache.pluto.core.impl.PortletSessionImpl.getInternalPortletContext(PortletSessionImpl.java:242)
> 	at org.apache.pluto.core.impl.PortletSessionImpl.getPortletContext(PortletSessionImpl.java:199)
>         ... portlet code ...
> 	at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
> 	at org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:96)
> 	at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:224)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> This was confirmed by Ate Douma on the jetspeed-users list. His explanation is:
> ...[I] already have traced down the cause.
> The bad news:
> This isn't something new but a missing implementation of a Pluto object model interface, namely:
>   PortletEntity.getPortletApplicationEntity() (which returns null in Jetspeed).
> After scanning the Pluto container sources, this is the *only* place this method is invoked at all (in the container that is) and we must have simply overlooked it.
> What Pluto actually does (in PortletSessionImpl.getInternalPortletContext) is trying to get to the current PortletApplicationDefinition:
>   portletEntity.getPortletApplicationEntity().getPortletApplicationDefinition()
> This could just as well have been written as:
>   portletEntity.getPortletDefinition().getPortletApplicationDefinition()
> which *is* implemented in Jetspeed.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org