[jboss-user] [JBoss Seam] - simple entity-home framework component not working
kaiwitte
do-not-reply at jboss.com
Wed Jul 25 08:33:31 EDT 2007
hello,
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:
| @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?
Kai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067376#4067376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067376
More information about the jboss-user
mailing list