I agree this is a geronimo problem.  Please file a jira.  I think Dain knows the most about this particular area.

Can you try deploying the second app with the first app stopped?  I think that will result in the proxyinfos all being loaded from the openejb-deployer's copy of openejb-core classes.

The only other workaround I can think of at the moment involves introducing another configuration whose sole purpose is to hold the openejb-core classes and be startable by the openejb builder without creating any gbeans.  This could be a parent of both the openejb deployer and the openejb runtime configurations.

I think the eventual solution is the directed acyclic graph classloader dain has been talking about.

thanks
david jencks

On Jun 13, 2006, at 6:21 PM, Ted Kirby wrote:

I think this is a geronimo problem. 
ProxyInfo is in openejb-core.jar, which is in the classpath of both openejb & openejb-deployer configs.
 
I define an ejb in an MDBDemo config (see attached openejb-jar.xml).
Through deployment, the openejb-deployer classloader is used for ProxyInfo.
The config is then stopped and serialized.
When it is subsequently started (all as part of my deploy from the command line),
the openejb classloader is used for ProxyInfo.
 
Next, I deploy an MDBDemoWar config (see attached geronimo-web.xml) from the command-line deployer.  I get the traceback below.
The ProxyInfo from gbeanData.getAttribute("proxyInfo") is from the openejb class loader,
whereas the ProxyInfo from OpenEJBReferenceBuilder is from the openejb-deployer class loader.
Hence, the ClassCastException.
 
I put some tracing in, including printing out the classloader info to make these determinations.
 
It seems that, based on this, a restriction is that you can't refer to an ejb in another configuration?

 
On 6/5/06, Ted Kirby <[EMAIL PROTECTED]> wrote:

I upgraded the plans from the sample, and have attached them to this note.

When I deploy the messaging war file, I get:

 Error: Unable to distribute messaging-ejb-1.1-SNAPSHOT.war:
 java.lang.ClassCastException: org.openejb.proxy.ProxyInfo

     org.openejb.proxy.ProxyInfo

I also get an error and long traceback in server log, which starts with:

15:51:11,689 ERROR [Deployer] Deployment failed due to
java.lang.ClassCastException: org.openejb.proxy.ProxyInfo
 at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java :121)
 at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:147)
 at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java(Inlined Compiled Code))
 at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java(Compiled Code))
 at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java(Inlined Compiled Code))
 at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java(Compiled Code))
 at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java(Inlined Compiled Code))
 at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java(Compiled Code))
 at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java(Compiled Code))
 at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$3716d4c8.createEJBRemoteRef(<generated>)
 at org.apache.geronimo.j2ee.deployment.RefContext.getEJBRemoteRef(RefContext.java:69)
 at org.apache.geronimo.naming.deployment.ENCConfigBuilder.addEJBRef(ENCConfigBuilder.java:412)
 at org.apache.geronimo.naming.deployment.ENCConfigBuilder.addEJBRefs(ENCConfigBuilder.java:339)
 at org.apache.geronimo.naming.deployment.ENCConfigBuilder.buildComponentContext (ENCConfigBuilder.java:731)
 at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.buildComponentContext(TomcatModuleBuilder.java:458)
 at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans( TomcatModuleBuilder.java :288)
 at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(<generated>)
 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java(Inlined Compiled Code))




Reply via email to