geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: EjbModuleBuilder passing in null arguments to buildEnvironemnt
Date Sun, 11 Feb 2007 18:59:16 GMT
Moving to dev@geronimo from tck list as this is non tck related.

On Feb 11, 2007, at 10:26 AM, Sachin Patel wrote:

> EjbModuleBuilder is passing in null for both the spec and G plans.   
> David what is the intent here?
>
> if (ejbModule.getEjbJar().getAssemblyDescriptor() != null) {
> 	namingBuilder.buildEnvironment(null, null, environment);
> }

I wrote this code.

We agreed on the dev list that all naming builders would be hard  
coded to always add their environment.  This is because we must build  
the environment before we have a class loader and we do not know what  
refs a bean has until we have a class loader (due to the need for  
annotation scanning).

Since they are hard coded to always add their environiment, there  
should be no inspection of the spec or vendor plans and null is ok.   
In the case of EjbModuleBuilder we have not have the XMLBeans trees  
at that point in the build so we can not pass in valid args anyway.

As for your specific problem:

Caused by: java.lang.NullPointerException
         at  
org.apache.geronimo.naming.deployment.SwitchingServiceRefBuilder.buildEn 
vironment(SwitchingServiceRefBuilder.java:76)
         at  
org.apache.geronimo.naming.deployment.SwitchingServiceRefBuilder$ 
$FastClassByCGLIB$$c7ee5732.invoke(<generated>)

The SwitchingServiceRefBuilder is inspecting the XMLBeans tree  
looking for jaxrpc and jaxws references which is not allowed.  That  
builder should be hard coded to always add the dependencies.

-dain


Mime
View raw message