9 Replies Latest reply on Aug 10, 2007 1:28 PM by Samuel Doyle

    EJB 3.0 Seam Component Not Found

    birwin Newbie

      I have an EJB 3.0 Stateful Session Bean that I am unable to see from my web page (JSP at the moment). From the log files it is apparent the bean is not being detected by the seam deployment scanner.

      My EJB:

      public class DivisionListenerBean implements DivisionListener
       @PersistenceContext (unitName="spike")
       private EntityManager em;
       private Log log;
       private int clientID = 5133;
       public void setClientID(int clientID)
       this.clientID = clientID;
       public int getClientID()
       return this.clientID;

      My ejb-jar.xml file:

      On the web client:
      my web.xml:
       <!-- Listeners -->
       <!-- Seam -->
       <!-- JSF -->
       <!-- Faces Servlet -->
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-name>Faces Servlet</servlet-name>
       <taglib-uri>http://java.sun.com/jsp/jstl/core </taglib-uri>

      My Faces-Config file:

      My Components.xml file:
      <components xmlns="http://jboss.com/products/seam/components"
       <core:init jndi-name="spike-ear-0.1.0/#{ejbName}/local" />

      My JSP file:
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       <title>SOS Trax</title>
       <link href="../../css/trax.css" rel="stylesheet" type="text/css" />
       <h2>Payroll Export Parameters</h2>
       <h:inputText value="#{divisionListener.clientID}" />

      My log file indicates the EJB is not detected and deployed and when I hit the JSP I get this in my log file:
      DEBUG [org.jboss.seam.Component] seam component not found: divisionListener

      I have verified that my EJB is available as an ejb with the JNDI name: "spike-ear-0.1.0/DivisionListenerBean/local". This is displayed in my Global JNDI Namespace section of the JBoss JMX Console. I also wrote an application that used this EJB as a plain EJB and I had no problems.

      Any ideas what I have done wrong?