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

    EntityManager not mounted under JNDI despite config

    aidan_b5

      Despite having the following persistence.xml:

      <persistence-unit name="objentity">
       <jta-data-source>java:/ShipdbDS</jta-data-source>
       <properties>
       <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"/>
       </properties>
       </persistence-unit>


      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!