[jboss-user] [JBoss Seam] - how to trace failed entityManager injection?

gsegura do-not-reply at jboss.com
Thu Feb 8 01:31:34 EST 2007

I'm using seam 1.1.5GA, and create a project with seam-gen. The authenticator component is generated automatically.
just filled the sql script (-dev.sql) to populate the database and when trying to test the login page this exception is thrown:

org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager

The relevant part of Authenticator.java is:
@In EntityManager entityManager ;

I have the same name in components.xml (all generated by seam-gen):
<core:managed-persistence-context name="entityManager" persistence-unit-jndi-name="java:/hermes2EntityManagerFactory"/>

Also I checked with jndi viewer and the datasource and entityManagerFactory were published successfuly:
Java: Namespace
  |   +- hermes2EntityManagerFactory (class: org.jboss.ejb3.entity.InjectedEntityManagerFactory)
  |   +- hermes2Datasource (class: javax.sql.DataSource)

No other exception before that one. Just little before, the console showed some unrelated  (I think) errors , all identical to this one:
00:05:25,656 ERROR [STDERR] 8/02/2007 12:05:25 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit

Finally, I include some lines from server.log which made me think everything was ok (except the last one :P ):

  | 2007-02-07 23:59:26,859 DEBUG [org.jboss.seam.deployment.Scanner] found: org/jboss/seam/core/EntityManagerFactory.class
  | ...
  | 2007-02-07 23:59:28,593 INFO  [org.jboss.seam.Component] Component: entityManager, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
  | ...
  | 2007-02-07 23:59:28,609 DEBUG [org.jboss.seam.Component] entityManager.persistenceUnitJndiName=java:/hermes2EntityManagerFactory
  | ...
  | 2007-02-08 00:05:43,968 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: entityManager
  | ...
  | 2007-02-08 00:05:43,984 ERROR [org.jboss.seam.core.Exceptions] redirecting to debug page
  | org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager

Excuse such a verbose post but I just don't have any clue.

how could I check why is failing the entityManager injection??
help please. 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012858#4012858

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012858

More information about the jboss-user mailing list