Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.11
-
None
-
None
-
Jboss Portal 2.6.3 + Jboss AS, Struts2 2.0.11
Description
When undeploying from Jboss portal, the sample portlet throws the following exception:
16:56:25,497 ERROR [org_apache_struts2_portlet_dispatcher_Jsr168Dispatcher] The portlet threw a runtime exception
java.lang.NullPointerException
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:268)
at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.destroy(Jsr168Dispatcher.java:584)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.destroyPortlet(PortletContainerImpl.java:378)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.stop(PortletContainerImpl.java:292)
at org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl.stopPortletApplication(PortletApplicationContextImpl.java:156)
at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.destroy(PortletAppDeployment.java:237)
at org.jboss.portal.server.deployment.jboss.DeploymentContext.destroy(DeploymentContext.java:125)
at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.destroy(PortalDeploymentInfoContext.java:237)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.destroy(ServerDeployer.java:235)
at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:704)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:639)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy214.undeploy(Unknown Source)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.undeploy(ServerDeployer.java:270)
at org.jboss.portal.server.deployment.WebAppAdapter.undeploy(WebAppAdapter.java:65)
at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:170)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy217.handleNotification(Unknown Source)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
at org.jboss.deployment.SubDeployerSupport.stop(SubDeployerSupport.java:319)
at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:98)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy195.stop(Unknown Source)
at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.undeploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:570)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
16:56:25,498 ERROR [org_apache_struts2_portlet_dispatcher_Jsr168Dispatcher] The portlet threw a runtime exception
java.lang.NullPointerException
at org.apache.struts2.dispatcher.Dispatcher.cleanup(Dispatcher.java:268)
at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.destroy(Jsr168Dispatcher.java:584)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.destroyPortlet(PortletContainerImpl.java:378)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.stop(PortletContainerImpl.java:292)
at org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl.stopPortletApplication(PortletApplicationContextImpl.java:156)
at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.destroy(PortletAppDeployment.java:237)
at org.jboss.portal.server.deployment.jboss.DeploymentContext.destroy(DeploymentContext.java:125)
at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.destroy(PortalDeploymentInfoContext.java:237)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.destroy(ServerDeployer.java:235)
at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:704)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:639)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy214.undeploy(Unknown Source)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.undeploy(ServerDeployer.java:270)
at org.jboss.portal.server.deployment.WebAppAdapter.undeploy(WebAppAdapter.java:65)
at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:170)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy217.handleNotification(Unknown Source)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
at org.jboss.deployment.SubDeployerSupport.stop(SubDeployerSupport.java:319)
at org.jboss.web.AbstractWebContainer.stop(AbstractWebContainer.java:509)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.stop(DeployerInterceptor.java:98)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptorSupport.java:196)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy195.stop(Unknown Source)
at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.undeploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:570)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
My humble guess is that both Jsr168Dispatcher and Dispatcher are cleaning the context; so the last one being called gets a null reference because the previous dispatcher already performed the clean.
As a side note, if you are not able to depoy on jboss, please remove the commons-logging jar from the sample portlet war file.