|Asking for help: "jee5_application_creation_tutorial" on JBoss 4.2.0 [message #599396]
||Thu, 17 May 2007 13:01
Originally posted by: dh_eclipseng.hellekalek.com|
I tried to follow the Tutorial Building an JEE5 Application using EJB3
Session, and JPA Entities from Raj Mandayam  on JBoss 4.2.0 but did not
manage to make it work.
It seems that the line
@PersistenceUnit(name="EJBProject1") EntityManagerFactory emf;
is without effect since
EntityManager em1 = emf.createEntityManager();
gives me a NullPointerException.
I uploaded my workspace to http://hellekalek.com/diverses/workspace.zip if
anybody would be so nice as to have a look at it.
I use JBoss 4.2.0 with the integrated Hibernate as persistence provider. I
selected JBoss's "ejb3-persistence.jar" as "default JPA implementation
library" in the JPA settings. The projects build without errors. The code of
setting up the datasource is at the end of this post. It works correctly (I
copied the driver to JBoss's lib directory and the log reports successfully
I hope somebody can tell me what I am doing wrong and how to fix it. I
searched for a really long time and did not figure it out.
datasource setup in JBoss:
Powered by FUDForum
. Page generated in 0.02315 seconds