2 Replies Latest reply on Jul 25, 2007 10:06 AM by Kai Witte

    simple entity-home framework component not working

    Kai Witte Newbie


      I am using Seam 1.2.0.PATCH1 with Tomcat 5.5. When I try to access an entity home from within a JSF site I get an exception

      javax.servlet.ServletException: entityManager is null
      at page request time. The stack trace does not contain any of my classes.

      The .XHTML:
      <h:inputText value="#{userHome.instance.name}"/>
      <h:commandButton value="Create User" action="#{userHome.persist}"/>

      The components.xml:
      <framework:entity-home name="userHome" entity-class="test.User" />

      The entity:
      public class User implements Serializable {

      In some other bean I use an injected @PersistenceContext successfully to retrieve all Users from the database.

      When I remove the line in components.xml and instead extend EntityHome (with an empty class body) the error at page request time is "javax.servlet.ServletException: In attribute requires non-null value".

      What can I do about it? What did I do wrong?