3 Replies Latest reply on Jan 31, 2006 1:41 PM by Maria Frias

    Null Entity Manager

    Maria Frias Newbie

      Hi, I am new with EJB3 and I am having some problems in my SessionBean, when trying to use the EntityManager it throws a NullPointerException.

      I am using the Firebird driver, and the persistence.xml file is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <entity-manager>
       <name>sem</name>
       <jta-data-source>java:/FIrebirdDS</jta-data-source>
       <properties>
       <property name="hibernate.dialect"
       value="org.hibernate.dialect.FirebirdDialect" />
       <property name="hibernate.cache.provider_class"
       value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
       <property name="hibernate.treecache.mbean.object_name"
       value="jboss.cache:service=EJB3EntityTreeCache"/>
       </properties>
      </entity-manager>

      The JBoss log shows the following when running:

      15:38:47,673 INFO [Ejb3Deployment] Create EntityManager with JNDI name: sem

      Any ideas about what could be wrong? Thanks!!