Hi,

i have a problem with the JNDI-call of the EntityManager.
When i call the JNDI-Name in my persistence.xml:

  | EntityManagerFactory emf = 
Persistence.createEntityManagerFactory("testDatabase");
  | EntityManager t_em = emf.createEntityManager();
  | 

then i get following exception

  | javax.persistence.PersistenceException: java.lang.NullPointerException
  |         at 
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:173)
  |         at 
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:103)
  |         at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
  |         at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
  |         at 
org.apache.catalina.session.StandardSession.expire(StandardSession.java:685)
  |         at 
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:577)
  |         at 
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
  |         at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
  |         at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283)
  |         at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
  |         at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
  |         at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
  |         at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
  |         at java.lang.Thread.run(Thread.java:595)
  | Caused by: java.lang.NullPointerException
  |         at 
org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(PersistenceXmlLoader.java:68)
  |         at 
org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:139)
  |         ... 15 more

I use the latest stable release of jboss with ejb3-support. 
(jboss-4.0.4RC1-installer.jar)
Is it better to use the CVS-Version of JBossAS?

A Entitymanager-call with Annotations is no problem!
What's wrong with the call?

Thanx!


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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to