You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ted Kirby (JIRA)" <de...@geronimo.apache.org> on 2006/06/14 17:07:30 UTC

[jira] Created: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
----------------------------------------------------------------------------------------------------

         Key: GERONIMO-2120
         URL: http://issues.apache.org/jira/browse/GERONIMO-2120
     Project: Geronimo
        Type: Bug
    Security: public (Regular issues) 
  Components: deployment, OpenEJB  
    Versions: 1.1    
 Environment: Win XP, Intel, Sun JDK 142
    Reporter: Ted Kirby


See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.

I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:

Error: Operation failed: java.lang.ClassCastException

with this server.log entry:

10:51:39,531 ERROR [Deployer] Deployment failed due to 
java.lang.ClassCastException
	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)


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


[jira] Updated: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=all ]

David Jencks updated GERONIMO-2120:
-----------------------------------

    Fix Version/s: 1.1.1
         Assignee: David Jencks
         Priority: Blocker  (was: Major)

I believe quite a few users have run into this problem.

> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2120
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment, OpenEJB
>    Affects Versions: 1.1
>         Environment: Win XP, Intel, Sun JDK 142
>            Reporter: Ted Kirby
>         Assigned To: David Jencks
>            Priority: Blocker
>             Fix For: 1.1.1
>
>         Attachments: GERONIMO-2120-djencks.patch
>
>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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

        

[jira] Commented: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=comments#action_12416214 ] 

David Jencks commented on GERONIMO-2120:
----------------------------------------

Looking at the code I think we could either use reflection on the proxyInfo from the "other" classloader or just punt on ClassCastException.  I'm not sure if either of these are likely to reveal more downstream problems, but I think either would fix the immediate issue.

Code is:
    private void checkRemoteProxyInfo(AbstractNameQuery query, String home, String remote, Configuration configuration) throws DeploymentException {
        if (remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome")) {
            // Don't verify the MEJB because it doesn't have a proxyInfo attribute
            return;
        }
        GBeanData gbeanData;
        try {
            gbeanData = configuration.findGBeanData(query);
        } catch (GBeanNotFoundException e) {
            return;
            //we can't check anything, hope for the best.
//            throw new DeploymentException("Could not locate ejb matching " + query + " in configuration " + configuration.getId());
        }
        ProxyInfo proxyInfo = (ProxyInfo) gbeanData.getAttribute("proxyInfo");  ///<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CCE
        if (proxyInfo == null) {
            throw new IllegalStateException("BUG! no proxy info found in gbeanData: " + gbeanData);
        }
        if (!proxyInfo.getHomeInterface().getName().equals(home)
                || !proxyInfo.getRemoteInterface().getName().equals(remote)) {
            throw new DeploymentException("Reference interfaces do not match bean interfaces:\n" +
                    "reference home: " + home + "\n" +
                    "ejb home: " + proxyInfo.getHomeInterface().getName() + "\n" +
                    "reference remote: " + remote + "\n" +
                    "ejb remote: " + proxyInfo.getRemoteInterface().getName());
        }
    }


> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>          Key: GERONIMO-2120
>          URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: deployment, OpenEJB
>     Versions: 1.1
>  Environment: Win XP, Intel, Sun JDK 142
>     Reporter: Ted Kirby

>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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


[jira] Commented: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "Ted Kirby (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=comments#action_12416261 ] 

Ted Kirby commented on GERONIMO-2120:
-------------------------------------

I would prefer some use of reflection, to keep in as much checking as possible.

I have successfully tested and run with the following code:

       Object proxyInfoObject = gbeanData.getAttribute("proxyInfo");
        
        if (proxyInfoObject == null) {
            throw new IllegalStateException("BUG! no proxy info found in gbeanData: " + gbeanData);
        }
        ProxyInfo proxyInfo = null;
        String proxyHomeName = null;
        String proxyRemoteName = null;
        try {
            proxyInfo = (ProxyInfo) proxyInfoObject;
            proxyHomeName = proxyInfo.getHomeInterface().getName();
            proxyRemoteName = proxyInfo.getRemoteInterface().getName();
        } catch (java.lang.ClassCastException e) {
            if (ProxyInfo.class.getName().equals(proxyInfoObject.getClass().getName())) {
                try {
                    Class proxyInfoClass = proxyInfoObject.getClass();
                    Method[] methods = proxyInfoClass.getMethods();
                    Method getHomeInterface = proxyInfoClass.getMethod("getHomeInterface",   null);
                    if (getHomeInterface != null) {
                        Class proxyHomeClass = (Class) getHomeInterface.invoke(proxyInfoObject, null);
                        proxyHomeName = proxyHomeClass.getName();
                    }
                    Method getRemoteInterface = proxyInfoClass.getMethod("getRemoteInterface",   null);
                    if (getRemoteInterface != null) {
                        Class proxyRemoteClass = (Class) getRemoteInterface.invoke(proxyInfoObject, null);
                        proxyRemoteName = proxyRemoteClass.getName();
                    }                    
                } catch(Exception ex) {                    
                }
            } else {
                throw e;
            }            
        }
        
        if (!home.equals(proxyHomeName) || !remote.equals(proxyRemoteName)) {
            throw new DeploymentException("Reference interfaces do not match bean interfaces:\n" +
                    "reference home: " + home + "\n" +
                    "ejb home: " + proxyHomeName + "\n" +
                    "reference remote: " + remote + "\n" +
                    "ejb remote: " + proxyRemoteName);
        }

It is a bit verbose and can be compressed, but that is how I developed, debugged and got it running.


> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>          Key: GERONIMO-2120
>          URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: deployment, OpenEJB
>     Versions: 1.1
>  Environment: Win XP, Intel, Sun JDK 142
>     Reporter: Ted Kirby

>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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


[jira] Commented: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
    [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=comments#action_12423850 ] 
            
David Jencks commented on GERONIMO-2120:
----------------------------------------

Main part of fix is in openejb ref 2823.

> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2120
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment, OpenEJB
>    Affects Versions: 1.1
>         Environment: Win XP, Intel, Sun JDK 142
>            Reporter: Ted Kirby
>         Assigned To: David Jencks
>            Priority: Blocker
>             Fix For: 1.1.1
>
>         Attachments: GERONIMO-2120-djencks.patch
>
>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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

        

[jira] Updated: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=all ]

David Jencks updated GERONIMO-2120:
-----------------------------------

    Attachment: GERONIMO-2120-djencks.patch

Here's a patch that also uses reflection to solve the 2-classloaders problem but also deals with the other (ProxyInfo) casts.    It doesn't seem to break anything I can find, but I haven't tested it with Ted's scenario.

I think Dain had the idea of eliminating ProxyInfo or exposing the classes directly through the ejb Container gbean.  Dain, would you prefer that solution go into 1.1.1?

> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>          Key: GERONIMO-2120
>          URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: deployment, OpenEJB
>     Versions: 1.1
>  Environment: Win XP, Intel, Sun JDK 142
>     Reporter: Ted Kirby
>  Attachments: GERONIMO-2120-djencks.patch
>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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


[jira] Closed: (GERONIMO-2120) Can't have ejb references outside current config. ClassCastException on org.openejb.proxy.ProxyInfo

Posted by "David Jencks (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2120?page=all ]

David Jencks closed GERONIMO-2120.
----------------------------------

    Resolution: Fixed

This part is not a problem in trunk since Dain removed passing around the ProxyInfo object.

> Can't have ejb references outside current config.  ClassCastException on org.openejb.proxy.ProxyInfo
> ----------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2120
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2120
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment, OpenEJB
>    Affects Versions: 1.1
>         Environment: Win XP, Intel, Sun JDK 142
>            Reporter: Ted Kirby
>         Assigned To: David Jencks
>            Priority: Blocker
>             Fix For: 1.1.1
>
>         Attachments: GERONIMO-2120-djencks.patch
>
>
> See http://mail-archives.apache.org/mod_mbox/geronimo-user/200606.mbox/%3c2E3C762A-A857-497F-9000-A7173EB177CC@yahoo.com%3e.
> I deploy (or distribute) a jar with an ejb, then deploy (or distribute) a war that references the ejb, and get:
> Error: Operation failed: java.lang.ClassCastException
> with this server.log entry:
> 10:51:39,531 ERROR [Deployer] Deployment failed due to 
> java.lang.ClassCastException
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.checkRemoteProxyInfo(OpenEJBReferenceBuilder.java:133)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:159)
> 	at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
> 	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
> 	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> 	at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
> 	at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
> 	at org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder$$EnhancerByCGLIB$$d6cd2b5d.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>)

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