On Oct 6, 2008, at 12:02 PM, John wrote:
Hi All,
I am trying to deploy an ear file to Geronimo 2.1.3. The ear
contains a number of dependency jar files, a war, an ejb and the
associated descriptors, or so I think.
However, when I attempt to deploy through the admin console, I am
getting the following exception:
java.lang.NullPointerException
org.apache.geronimo.common.DeploymentException:
java.lang.NullPointerException
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:275)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
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:585)
at
org
.apache
.geronimo
.gbean
.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:
34)
at
org
.apache
.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
org
.apache
.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
239)
at
org
.apache
.geronimo
.deployment
.plugin
.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at
org
.apache
.geronimo
.deployment
.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NullPointerException
at
org
.apache
.geronimo
.connector
.deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:
127)
at
org
.apache
.geronimo
.j2ee
.deployment
.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
at
org
.apache
.geronimo
.openejb
.deployment.EjbDeploymentBuilder.addEnc(EjbDeploymentBuilder.java:321)
at
org
.apache
.geronimo
.openejb
.deployment.EjbDeploymentBuilder.buildEnc(EjbDeploymentBuilder.java:
292)
at
org
.apache
.geronimo
.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:
764)
at
org
.apache
.geronimo
.j2ee
.deployment
.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
... 12 more
My question is, can anyone give me some ideas on how to track down a
vague, non-descript, error such as this?
What I do is look at the source code.
Googling ResourceRefBuilder yields a commit email which leads to e.g.
http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/connector/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java?annotate=651684
Modifying this to the 2.1.3 branch yields
http://svn.apache.org/viewvc/geronimo/server/tags/2.1.3/plugins/connector/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java?annotate=651684
which despite the wrong rev id seems to show the correct source.
Line 127 is
String type = resourceRef.getResType().getStringValue().trim();
which makes me guess that you've left out the res-type from your
resource-ref.
May not be completely ideal but this process usually works for me.
thanks
david jencks
Thanks in advance,
John