users@glassfish.java.net

ejb3 call from ejb

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 Aug 2008 08:10:17 PDT

Hello everyone

I have a problem to lookup a ejb3 bean.
I deployed a -ejb.jar with a method to deploy other beans (using jsr88). the deployment of the new ejb.jar works but when i try to get the deployed bean, i always get a classNotFoundException. The beans are not in the same jar.


code from the lookup:
 [i]Context objContext = null;
        objContext = new InitialContext();
        
        Bean1 = (Bean1) objContext.lookup(Bean1);[/i]

Code from bean1
[i]@Stateless(mappedName="Bean1")
public class Batch45Bean implements Bean1Remote {
...
}
[/i]
Errors:
 [i]javax.naming.NamingException: ejb ref resolution error for remote business interface Bean1Remote [Root exception is java.lang.ClassNotFoundException: Bean1Remote]
        at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:425)
        at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:403)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
...
[/i]

im using Glassfish V2

Anyone has a solution for this problem?
thx for your help!
[Message sent by forum member 'ruosctho' (ruosctho)]

http://forums.java.net/jive/thread.jspa?messageID=295949