[
https://jira.jboss.org/browse/GTNPORTAL-1345?page=com.atlassian.jira.plug...
]
Trong Tran resolved GTNPORTAL-1345.
-----------------------------------
Resolution: Done
Avoid NPE when a portal container has been disabled
---------------------------------------------------
Key: GTNPORTAL-1345
URL:
https://jira.jboss.org/browse/GTNPORTAL-1345
Project: GateIn Portal
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Nicolas Filotto
Assignee: Khoi Nguyen
Fix For: 3.2.0-GA
Attachments: GTNPORTAL-1345.diff
Original Estimate: 2 hours
Remaining Estimate: 2 hours
Thanks to EXOJCR-842, it is possible to avoid creating a given portal container if it has
not been registered. However this has for consequences that we get some NPE (due to the
fact that the container is null) in the portal since up to now GateIn doesn't allow to
disable a portal.
The steps to reproduce are the following
1. Use exo.kernel.container-2.2.4-GA (or build the snapshot version if it is not yet
released), in order to get the benefits of the feature EXOJCR-842
2. Remove the portal container definition of sample-portal from
gatein-sample-portal.ear/exo.portal.sample.portal.config-3.0.0-GA.jar/conf/configuration.xml,
in order to avoid registering the sample-portal
3. Start JBoss AS
4. Ensure that only the portal container "portal" has been launched
5. Stop JBoss AS, you should get the following exception:
Cannot broadcast the event
'org.exoplatform.web.GenericHttpListener.contextDestroyed'
java.lang.NullPointerException
at org.exoplatform.web.GenericHttpListener.broadcast(GenericHttpListener.java:216)
at
org.exoplatform.web.GenericHttpListener.contextDestroyed(GenericHttpListener.java:143)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4516)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671)
7 juil. 2010 07:56:26 org.apache.coyote.http11.Http11Protocol destroy
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira