portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Assigned: (JS2-254) NullPointerException in PortletSession.getPortletContext()
Date Wed, 11 May 2005 23:23:16 GMT
     [ 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


Mime
View raw message