geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Collins <>
Subject JNDI in Geronimo 2
Date Mon, 09 Mar 2009 15:55:50 GMT
Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am pretty sure I understand
all of the concepts but I am having an issue with a JNDI lookup in Geronimo.  I have created
a Bean and it looks as follows.


public interface FirstObjectRemote {
      public String hello(String name);


public class FirstObject implements FirstObjectRemote {

   public FirstObject() {

   public String hello(String name){
                  return "Hello " + name;


Everything deploys just fine (at lease I think it does).  I created a test class:

public class TheClass
public static void main(String[] args)
            Properties prop=new Properties();
            prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
            prop.put(Context.PROVIDER_URL, "ejbd://localhost:1099");

                  Context context = new InitialContext(prop);
                  FirstObjectRemote firstObject = (FirstObjectRemote)context.lookup("FirstObjectRemote");
            catch(Exception ex){


I get an error I when trying to run this.  The error that comes back is:

javax.naming.NamingException: Cannot lookup '/FirstObjectRemote'. [Root exception is java.rmi.RemoteException:
Error while communicating with server: ; nested exception is:
      java.lang.NoClassDefFoundError: javax/transaction/RollbackException]

What am I missing?

View raw message