[jboss-user] [JBoss Seam] - Re: EntityManager newibe Question

mrohad do-not-reply at jboss.com
Fri Aug 25 10:04:22 EDT 2006


here are how I define the EM:

  | 	@PersistenceContext(unitName="globalEM")
  | 	private transient EntityManager em;
  | 
here is xml

  | <persistence>
  |    <persistence-unit name="globalEM">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/DefaultDS</jta-data-source>
  |       <properties>
  |          <property name="hibernate.hbm2ddl.auto" value="validate"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <!-- These are the default for JBoss EJB3, but not for HEM: -->
  |          <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
  |          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/selectItemsEntityManagerFactory"/>
  |          <property name="jboss.entity.manager.jndi.name" value="java:/selectItemsEntityManager"/>
  |       </properties>
  |    </persistence-unit>
  | </persistence>
I am getting null pointer exception
while using em.find(...)



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

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



More information about the jboss-user mailing list