java - EJB - Lookup failed for 'ejb/BookRequestBean' -
i new ejb, , trying "hello world" type of ejb java program. here ejb:
package dukesbookstore.ejb; @stateless(name="bookrequestbean", mappedname="ejb/bookrequestbean") @named public class bookrequestbean { //other codes here } and here client:
properties prop = new properties(); prop.put(context.initial_context_factory, "com.sun.enterprise.naming.serialinitcontextfactory"); prop.setproperty("org.omg.corba.orbinitialhost", "localhost"); prop.setproperty("org.omg.corba.orbinitialport", "3700"); try { initialcontext ctx = new initialcontext(prop); ctx.lookup("ejb/bookrequestbean"); system.out.println("ejb look-up successfull!!"); } catch (namingexception e) { // todo auto-generated catch block e.printstacktrace(); } but whenever try run, getting below exception:
javax.naming.namingexception: lookup failed 'ejb/bookrequestbean' in serialcontext[myenv={org.omg.corba.orbinitialport=3700, java.naming.factory.initial=com.sun.enterprise.naming.serialinitcontextfactory, org.omg.corba.orbinitialhost=localhost, java
i have added appserv-rt.jar , gf-client.jar, javaee.jar, still no luck. can me, missing here? usign glassfish 3.1
| | full stacktrace help. make sure @ : glassfish.java.net/javaee5/ejb/ejb_faq.html#pojolocalejb – lmeyer may 10 '13 @ 21:15 |