8 Replies Latest reply on Oct 15, 2007 10:05 AM by Pascal Sternon

    EntityManager null

    Sergio R Pantano Newbie

      I made:

      <component name="em" auto-create="true" class="org.jboss.seam.core.ManagedPersistenceContext">
       <property name="persistenceUnitJndiName">java:/data</property>
       </component>
      
       <component name="org.jboss.seam.ui.entityConverter">
       <property name="entityManager">#{em}</property>
       </component>
      
       <component name="roles" class="org.jboss.seam.framework.EntityQuery">
       <property name="ejbql">select r from Role r</property>
       </component>
      


      but when I run the facelet page with:
      <h:selectOneMenu value="#{list.roles}" required="true">
       <s:selectItems value="#{roles.resultList}" var="role" label="#{role.descricao}" noSelectionLabel="Please Select..."/>
       <s:convertEntity />
       </h:selectOneMenu>
      


      but the result is:
      java.lang.IllegalStateException: entityManager is null

      please, I´m missing something?

      PS.: I´m using Seam 1.2.1GA, Jboss 4.2.0ga and facelets 1.12