users@glassfish.java.net

EJB problem

From: <glassfish_at_javadesktop.org>
Date: Thu, 26 Apr 2007 00:32:42 PDT

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"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>Movies</servlet-name>
<servlet-class>edu.umassd.ecom.Movies</servlet-class>
</servlet>
<servlet>
<servlet-name>Dates</servlet-name>
<servlet-class>edu.umassd.ecom.Dates</servlet-class>
</servlet>
<servlet>
<servlet-name>Times</servlet-name>
<servlet-class>edu.umassd.ecom.Times</servlet-class>
</servlet>
<servlet>
<servlet-name>Availability</servlet-name>
<servlet-class>edu.umassd.ecom.Availability</servlet-class>
</servlet>
<servlet>
<servlet-name>Confirmation</servlet-name>
<servlet-class>edu.umassd.ecom.Confirmation</servlet-class>
</servlet>
<servlet>
<servlet-name>Cancellation</servlet-name>
<servlet-class>edu.umassd.ecom.Cancellation</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Movies</servlet-name>
<url-pattern>/Movies</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Dates</servlet-name>
<url-pattern>/Dates</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Times</servlet-name>
<url-pattern>/Times</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Availability</servlet-name>
<url-pattern>/Availability</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Confirmation</servlet-name>
<url-pattern>/Confirmation</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Cancellation</servlet-name>
<url-pattern>/Cancellation</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<ejb-ref>
<ejb-ref-name>ejb/MovielistFacadeBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.MovielistFacadeRemoteHome</home>
<remote>edu.umassd.ecom.MovielistFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#MovielistFacadeBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/MovieinfoFacadeBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.MovieinfoFacadeRemoteHome</home>
<remote>edu.umassd.ecom.MovieinfoFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/MovieinfoFacadeBean1</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.MovieinfoFacadeRemoteHome</home>
<remote>edu.umassd.ecom.MovieinfoFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/MovieinfoFacadeBean2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.MovieinfoFacadeRemoteHome</home>
<remote>edu.umassd.ecom.MovieinfoFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#MovieinfoFacadeBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/CustomerFacadeBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.CustomerFacadeRemoteHome</home>
<remote>edu.umassd.ecom.CustomerFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#CustomerFacadeBean</ejb-link>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/CustomerFacadeBean1</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>edu.umassd.ecom.CustomerFacadeRemoteHome</home>
<remote>edu.umassd.ecom.CustomerFacadeRemote</remote>
<ejb-link>MovieTicketReservation-EJBModule.jar#CustomerFacadeBean</ejb-link>
</ejb-ref>
</web-app>

jboss-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain flushOnSessionInvalidation="false"/>
<context-root>/MovieTicketReservation-WebModule</context-root>
</jboss-web>

Please help me with this.
[Message sent by forum member 'g_svadla' (g_svadla)]

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