Hi,

I have an application which uses remote EJBs.
I am working with Geronimo 1.1.1.

web.xml has
    <ejb-ref id="EjbRef_1">
        <description/>
        <ejb-ref-name>ejb/AuthenticateSession</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>samples.biz.ejb.authenticate.AuthenticateSessionHome</home>
        <remote>samples.biz.ejb.authenticate.AuthenticateSession </remote>
        <ejb-link>AuthenticateSessionEJB</ejb-link>
    </ejb-ref>

Corresponding EJB jar is under ../WEB-INF/lib/ and not at the ear level, hope that will be fine.

When i tried to deploy the ear, i got the following exception
Could not find an EJB for reference ejb/AuthenticateSession to a remote session bean that has the home interface samples.biz.ejb.authenticate.AuthenticateSessionHome and the remote interface samples.biz.ejb.authenticate.AuthenticateSession
org.apache.geronimo.common.UnresolvedEJBRefException: Could not find an EJB for reference ejb/AuthenticateSession to a remote session bean that has the home interface samples.biz.ejb.authenticate.AuthenticateSessionHome and the remote interface samples.ejb.authenticate.AuthenticateSession at org.openejb.deployment.OpenEJBReferenceBuilder.getMatch(OpenEJBReferenceBuilder.java:257) at org.openejb.deployment.OpenEJBReferenceBuilder.createEJBRemoteRef(OpenEJBReferenceBuilder.java:217) at org.openejb.deployment.OpenEJBReferenceBuilder$$FastClassByCGLIB$$bfd62c9f.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

When i removed <ejb-link> tag in web.xml(in the part shown above) and defined a reference in geronimo-web.xml as below

    <naming:ejb-ref>
        <ref-name>ejb/AuthenticateSession</ref-name>
        <pattern>
            <artifactId>sample-rc</artifactId>
            <name>AuthenticateSession</name>
        </pattern>
    </naming:ejb-ref>

then i got the following exception

19:31:30,761 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="sample-rc/samplewsapp/rc/car?configurationName=sample-rc/samplewsapp/rc/car"
org.apache.geronimo.kernel.config.InvalidConfigException : Unable to deserialize GBeanState
    at org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:120)
    at org.apache.geronimo.kernel.config.SerializedGBeanState.getGBeans(SerializedGBeanState.java :65)
    at org.apache.geronimo.kernel.config.ConfigurationData.getGBeans(ConfigurationData.java:171)
    at org.apache.geronimo.kernel.config.Configuration.<init>(Configuration.java:277)
    at org.apache.geronimo.kernel.config.Configuration .<init>(Configuration.java:295)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance (GBeanInstance.java:933)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:267)
    at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java :102)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:526)
    at org.apache.geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:361)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.load (KernelConfigurationManager.java:161)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:307)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration (SimpleConfigurationManager.java:275)
    at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:250)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager.loadConfiguration (KernelConfigurationManager.java:112)
    at org.apache.geronimo.kernel.config.KernelConfigurationManager$$FastClassByCGLIB$$b117102f.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.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$4ac69885.loadConfiguration(<generated>)
    at org.apache.geronimo.deployment.plugin.local.RedeployCommand.redeploySameConfiguration (RedeployCommand.java:226)
    at org.apache.geronimo.deployment.plugin.local.RedeployCommand.run(RedeployCommand.java:99)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: Unable to find class used in GBeanData sample-rc/samplewsapp/rc/car?J2EEApplication=sample-rc/samplewsapp/rc/car,j2eeType=WebModule,name= samplews-rc.war
    at org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:268)
    at org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:111)
    ... 30 more
Caused by: java.lang.ClassNotFoundException: Unable to find class used in GBeanData sample-rc/samplewsapp/rc/car?J2EEApplication=sample-rc/samplewsapp/rc/car,j2eeType=WebModule,name=samplews-rc.war, attribute: componentContext
    at org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:237)
    ... 31 more
Caused by: java.lang.ClassNotFoundException: Could not load class org.openejb.proxy.EJBProxyReference from classloader: sample-rc/samplewsapp_samplews- rc.war/rc/car, destroyed state: false
    at org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:213)
    at org.apache.geronimo.kernel.ObjectInputStreamExt.resolveClass(ObjectInputStreamExt.java:38)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java :1693)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    at java.util.HashMap.readObject(HashMap.java:1011)
    at sun.reflect.GeneratedMethodAccessor302.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java :1713)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    at org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java :235)
    ... 31 more


Please provide me some input on where i am going wrong or what could be the problem.

Thanks and Regards,
Hari