[jboss-jira] [JBoss JIRA] Assigned: (JBAS-5983) NullPointerException occurs in MainDeployer.listDeployedModules() when there is a module with no associated deployer

Ales Justin (JIRA) jira-events at lists.jboss.org
Wed Sep 24 05:38:20 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBAS-5983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ales Justin reassigned JBAS-5983:
---------------------------------

    Assignee: Dimitris Andreadis  (was: Ales Justin)


Re-assigning it to Dimitris, who was involved with deployment for JBoss 4.x.

> NullPointerException occurs in MainDeployer.listDeployedModules() when there is a module with no associated deployer
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-5983
>                 URL: https://jira.jboss.org/jira/browse/JBAS-5983
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Deployers
>    Affects Versions: JBossAS-4.2.1.GA, JBossAS-4.2.2.GA, JBossAS-4.2.3.GA
>            Reporter: Ian Springer
>            Assignee: Dimitris Andreadis
>            Priority: Critical
>
> To reproduce this, drop an empty file named foo.xml somewhere under the deploy dir (I dropped mine under an exploded ear, but I don't think it matters if it's under an ear). The file will fail to deploy, but a DeploymentInfo will still be created for it, e.g.:
> [org.jboss.deployment.DeploymentInfo at ee0f6e74 { url=file:/C:/Projects/rhq-trunk/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/foo.xml }
>   deployer: null
>   status: null
>   state: INIT_WAITING_DEPLOYER
>   watch: file:/C:/Projects/rhq-trunk/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/foo.xml
>   altDD: null
>   lastDeployed: 1222197704045
>   lastModified: 1222197704045
>   mbeans:
> ]
> Now go the MainDeployer MBean in the jmx-console and try to invoke the listDeployedModules() operation. You should get the following exception:
> javax.management.RuntimeMBeanException
> 	org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
> 	org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
> 	org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 	org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> 	org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> 	org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 	org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 	org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
> 	org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:113)
> 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> root cause
> java.lang.NullPointerException
> 	org.jboss.deployment.SerializableDeploymentInfo.<init>(SerializableDeploymentInfo.java:102)
> 	org.jboss.deployment.MainDeployer.listDeployedModules(MainDeployer.java:261)
> 	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	java.lang.reflect.Method.invoke(Method.java:597)
> 	org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 	org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 	org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> 	org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> 	org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> 	org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 	org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:258)
> 	org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
> 	org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:113)
> 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> The NPE occurs on the following line in the constructor of SerializableDeploymentInfo:
>     this.deployer = info.deployer.getServiceName();
> because info.deployer is null.
> I think the fix is changing the line to:
>     this.deployer = (info.deployer != null) ? info.deployer.getServiceName() : null;
> This is an important fix for JON, because the listDeployedModules() JMX operation is relied on for EAR/WAR discovery.

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

        



More information about the jboss-jira mailing list