Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
When deploying an MDB, if it does not have a resource-adapter element, the "openejbMessageDrivenBean.getResourceAdapter()" call in MdbBuilder.buildBeans(...) will return a null value causing a NullPointerException when the MdbBuilder.getResourceAdapterId method is called.
In openejb-jar.xsd it has the following in the message-driven-beanType:
<xs:element ref="naming:resource-adapter" minOccurs="0"/>
Does the schema need changing (change so that minOccurs is not specified) or should MdbBuilder be checking for a null value and throw a DeploymentException?
-----------------
Deployment failed
Server reports: org.apache.geronimo.common.DeploymentException: java.lang.NullPointerException
org.apache.geronimo.kernel.InternalKernelException: org.apache.geronimo.common.DeploymentException: java.lang.NullPointerException
at org.apache.geronimo.kernel.jmx.KernelDelegate.invoke(KernelDelegate.java:232)
at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:86)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.apache.geronimo.common.DeploymentException: java.lang.NullPointerException
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:239)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:80)
at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:684)
at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:302)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:121)
at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:684)
at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:302)
at org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(MBeanServerDelegate.java:117)
at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java:222)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:36)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjectInvoker.java:98)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionSubjectInvoker.java:32)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjectInvoker.java:89)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:151)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnectionSubjectInvoker.java:85)
at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubjectInvoker.java:79)
at $Proxy0.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:224)
at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
... 1 more
Caused by: java.lang.NullPointerException
at org.openejb.deployment.MdbBuilder.getResourceAdapterId(MdbBuilder.java:264)
at org.openejb.deployment.MdbBuilder.addActivationSpecWrapperGBean(MdbBuilder.java:218)
at org.openejb.deployment.MdbBuilder.buildBeans(MdbBuilder.java:118)
at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:458)
at org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:658)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
at org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:92)
at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e45a280.addGBeans(<generated>)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:350)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:658)
at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
at org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
at org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:92)
at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7a1ca0ae.buildConfiguration(<generated>)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:200)
... 40 more