EJB problem

Discussions

EJB programming & troubleshooting: EJB problem

  1. EJB problem (3 messages)

    hi I am new to EJBs. I am developing a J2EE application using NetBeans IDE. My project is deployed successfully, but when I try to run the servlet from the webmodule to retrieve data from the database, I get the error "javax.naming.NamingException: ejb-ref: ejb/CustomerFacadeBean, no ejb-link in web.xml and no jndi-name in jboss-web.xml" and the output is "No such Entity!" These are my web.xml and jboss-web.xml files web.xml: <!--?xml version="1.0" encoding="UTF-8"?--> Movies edu.umassd.ecom.Movies Dates edu.umassd.ecom.Dates Times edu.umassd.ecom.Times Availability edu.umassd.ecom.Availability Confirmation edu.umassd.ecom.Confirmation Cancellation edu.umassd.ecom.Cancellation Movies /Movies Dates /Dates Times /Times Availability /Availability Confirmation /Confirmation Cancellation /Cancellation 30 index.jsp ejb/MovielistFacadeBean Session edu.umassd.ecom.MovielistFacadeRemoteHome edu.umassd.ecom.MovielistFacadeRemote MovieTicketReservation-EJBModule.jar#MovielistFacadeBean ejb/MovieinfoFacadeBean Session edu.umassd.ecom.MovieinfoFacadeRemoteHome edu.umassd.ecom.MovieinfoFacadeRemote MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean ejb/MovieinfoFacadeBean1 Session edu.umassd.ecom.MovieinfoFacadeRemoteHome edu.umassd.ecom.MovieinfoFacadeRemote MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean ejb/MovieinfoFacadeBean2 Session edu.umassd.ecom.MovieinfoFacadeRemoteHome edu.umassd.ecom.MovieinfoFacadeRemote MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean ejb/CustomerFacadeBean Session edu.umassd.ecom.CustomerFacadeRemoteHome edu.umassd.ecom.CustomerFacadeRemote MovieTicketReservation-EJBModule.jar#CustomerFacadeBean ejb/CustomerFacadeBean1 Session edu.umassd.ecom.CustomerFacadeRemoteHome edu.umassd.ecom.CustomerFacadeRemote MovieTicketReservation-EJBModule.jar#CustomerFacadeBean jboss-web.xml: <!--?xml version="1.0" encoding="UTF-8"?--> /MovieTicketReservation-WebModule Please help me with this.

    Threaded Messages (3)

  2. SNeed more info[ Go to top ]

    Hi there I need to see the code you use to lookup your ejb home interface.
  3. code to lookup ejb home interface[ Go to top ]

    Hi William! This is the code to lookup customer bean home interface private edu.umassd.ecom.CustomerLocalHome lookupCustomerBean() { try { javax.naming.Context c = new javax.naming.InitialContext(); edu.umassd.ecom.CustomerLocalHome rv = (edu.umassd.ecom.CustomerLocalHome) c.lookup("java:comp/env/ejb/CustomerBean"); return rv; } catch(javax.naming.NamingException ne) { java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne); throw new RuntimeException(ne); } } Thanks for your time!!!
  4. Problem in JNDI naming[ Go to top ]

    Mr. Shiv Prasad. I think there is a problem in JNDI name in the jboss web.xml. It seems that the given ejb name in ejb-web.xml and in the jboss web.xml is different. So please check with the names of both in the both web.xml and try again.