1 Reply Latest reply on Sep 22, 2006 9:04 AM by Adrian Pillinger

    EntityManager not mounted under JNDI despite config

    aidan davis Newbie

      Despite having the following persistence.xml:

      <persistence-unit name="objentity">
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>
       <property name="jboss.entity.manager.jndi.name" value="java:/Objentity"/>

      when i do a jndi lookup for the manager thus:

      InitialContext ic = new InitialContext();
       EntityManager em = (EntityManager) ic.lookup("Objentity");

      I get an 'Objentity not bound' Exception. I've checked the JMX console and the persistence units are bound....but there's no sign of the entity manager.

      I'm using jboss 4.03 with EJBRC6......this is fairly urgent so help definately appreciated!