geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atul12345 <>
Subject how to run Ejb program on geronimo
Date Mon, 31 Mar 2008 07:52:37 GMT

 Dear Sir,

              I am new programmer to Geronimo and EJB which are running on
gentoo. i am createing stateful session bean like that........
This is remote Interface..........
package My;

import java.rmi.*;

import javax.ejb.*;

public interface DemoInter extends EJBObject
           public int add(int a,int b) throws RemoteException;

This is Home Interface..........
package My;

import javax.ejb.*;
import java.rmi.*;

public interface DemoHome extends EJBHome
public DemoInter create() throws CreateException,RemoteException;

This is Bean class............

package My;

import java.rmi.*;

import javax.ejb.*;

public class DemoBean implements SessionBean
         public DemoBean() {
                // TODO Auto-generated constructor stub
        public void ejbCreate()
        public void ejbRemove()

public void ejbActivate()

public void ejbPassivate()

public void setSessionContext(SessionContext ctx){}

public int add(int a,int b) throws RemoteException
return (a+b);

open-ejb.xml is where i specified the jndi name

<openejb-jar xmlns=""

 and this is my client code...........

import java.util.*;
import javax.naming.*;
import javax.rmi.*;
import My.*;

public class Client {

         * @param args
        public static void main(String[] args) {
                // TODO Auto-generated method stub
                try {
                        Properties properties=new Properties();
"ejbd://localhost:4201" );
            Context ctx=new InitialContext(properties);
  My.DemoInter object =home.create();

that is my code, everything is ok means deploy successfully but problem is
when i execute client program, that time i get error that is

javax.naming.NameNotFoundException: org.geronimo.ejbsample.HomeBean does not
exist in the system.  Check that the app was successfully deployed.
So if anybody know how to resolve this problem then please give me suitable
suggestion to resolve this problem..

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message