geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Sears" <rise...@gmail.com>
Subject Re: java.lang.ClassCastException: org.openejb.proxy.ProxyInfo
Date Thu, 15 Jun 2006 03:33:57 GMT
Sorry, should have been more explanatory in my inclusion of the
geronimo-web.xml file.  I've actually tried using both ejb-ref and
ejb-local-ref declarations, both giving the same error with a slightly
different stack trace.  Here is the stack trace when using
ejb-local-ref:

java.lang.ClassCastException: org.openejb.proxy.ProxyInfo
        at org.openejb.deployment.OpenEJBReferenceBuilder.checkLocalProxyInfo(OpenEJBReferenceBuilder.java:94)
        at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBLocalRef(OpenEJBReferenceBuilder.java:160)
        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$$1e25d088.createEJBLocalRef(<generated>)
        at org.apache.geronimo.j2ee.deployment.RefContext.getEJBLocalRef(RefContext.java:73)
        at org.apache.geronimo.naming.deployment.ENCConfigBuilder.addEJBLocalRef(ENCConfigBuilder.java:482)
        at org.apache.geronimo.naming.deployment.ENCConfigBuilder.addEJBLocalRefs(ENCConfigBuilder.java:431)
        at org.apache.geronimo.naming.deployment.ENCConfigBuilder.buildComponentContext(ENCConfigBuilder.java:734)
        at org.openejb.deployment.SessionBuilder.processEnvironmentRefs(SessionBuilder.java:165)
        at org.openejb.deployment.SessionBuilder.addEJBContainerGBean(SessionBuilder.java:306)
...

When using an ejb-ref I get the following stack trace:

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: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$$1e25d088.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.openejb.deployment.SessionBuilder.processEnvironmentRefs(SessionBuilder.java:165)
        at org.openejb.deployment.SessionBuilder.addEJBContainerGBean(SessionBuilder.java:306)
        at org.openejb.deployment.SessionBuilder.buildBeans(SessionBuilder.java:192)
        at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:521)
        at org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
...

Hope these stack traces help.  I'll be interested to try the potential
fixes mentioned in the JIRA issue once there is a decision on the
right direction to go to fix this problem.

Thanks,
Rick Sears

On 6/14/06, David Jencks <david_jencks@yahoo.com> wrote:
> I wouldn't expect an ejb-local-ref to work except within a single
> ear... does using a remote ref work any better?  Do you have any line
> numbers or stack trace from the exception?
>
> thanks
> david jencks
>
> On Jun 14, 2006, at 12:17 PM, Rick Sears wrote:
>
> > I am currently using the pattern syntax in all my references to EJBs
> > that exist in the seperate module deployed within Geronimo.  As an
> > example, here is a snippet of the geronimo-web.xml for my webapp:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> >               xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
> >               xmlns:tomcat="http://geronimo.apache.org/xml/ns/j2ee/web/
> > tomcat-1.1">
> >       <environment>
> >               <dependencies>
> > ...
> >               </dependencies>
> >       </environment>
> >
> >       <context-root>/services</context-root>
> >
> >       <ejb-local-ref>
> >               <ref-name>ejb/PortalAccess</ref-name>
> >               <pattern>
> >                       <groupId>testcompany</groupId>
> >                       <artifactId>testdaomodule</artifactId>
> >                       <version>3.0</version>
> >                       <module>backend-dao-module.jar</module>
> >                       <name>PortalAccessEJB</name>
> >               </pattern>
> >       </ejb-local-ref>
> > ...
> > </web-app>
> >
> > I attempted to remove the dependency in my geronimo-application.xml
> > for the webapp on the other deployed module, but this resulted in an
> > error in locating the ejb:
> >
> > Error: Unable to distribute
> >    backend-registration-module.ear: Could not
> >    locate ejb matching
> >    testcompany/testdaomodule/3.0/car?EJBModule=backend-dao-
> > module.jar,name=PortalAccessEJB#
> >    in configuration
> >    testcompany/testregistrationmodule/3.0/car
> >
> > This error occured both when I deployed the testdaomodule first or
> > when I attempted to deploy the testregistrationmodule first.  I'll be
> > watching this thread and the JIRA issue posted for further updates.
> >
> > Thanks again,
> > Rick Sears
> >
> > On 6/14/06, David Jencks <david_jencks@yahoo.com> wrote:
> >>
> >> On Jun 14, 2006, at 8:44 AM, Rick Sears wrote:
> >>
> >> > I'm having a similar problem with an application that I am porting
> >> > from Geronimo 1.0 to the 1.1-rc1 snapshot.  There are references
> >> > (tried both ejb-ref remote references and ejb-local-ref local
> >> > references) in my webapp that refer to EJBs deployed in another ear
> >> > within Geronimo.  This worked perfectly fine in Geronimo 1.0,
> >> but is
> >> > now not working at all in Geronimo 1.1-rc1 with the same
> >> > ClassCastException referred in the previous message.  Please let me
> >> > know if there is some other way to allow classes in my webapp to
> >> refer
> >> > to a locally deployed EJB that exists in another ear within
> >> Geronimo.
> >> > If there is no workaround, then I am anxiously awaiting a
> >> resolution
> >> > to this issue in Geronimo 1.1.
> >>
> >> The only workaround I currently think might work is to _not_ have the
> >> webapp have a dependency on the ear (or ejb app for Ted's case) and
> >> to deploy the web app first.  This will avoid the logic that has the
> >> CCE.  You also have to specify the components of the ejb target name
> >> rather than using an ejb-link in the geronimo plan.
> >>
> >> Please let us know if this works.
> >>
> >> thanks
> >> david jencks
> >>
> >> >
> >> > Thanks for your guys hard work,
> >> > Rick Sears
> >>
> >>
>
>

Mime
View raw message