Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Asking for help: "jee5_application_creation_tutorial" on JBoss 4.2.0
Asking for help: "jee5_application_creation_tutorial" on JBoss 4.2.0 [message #599396] Thu, 17 May 2007 13:01
Eclipse UserFriend
Originally posted by: dh_eclipseng.hellekalek.com

Hello,

I tried to follow the Tutorial Building an JEE5 Application using EJB3
Session, and JPA Entities from Raj Mandayam [1] 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
loading it)

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.

Best Regards,
David

[1]
http://www.eclipse.org/webtools/jst/components/j2ee/scenario s/jee5_application_creation_tutorial.html

datasource setup in JBoss:
<local-tx-datasource>
<jndi-name>TestDS</jndi-name>
<connection-url>jdbc:mysql://...:3306/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>...</user-name>
<password>...</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
Previous Topic:WTP 1.5.4 Released
Next Topic:i can not see jpa perspective in wtp1.5.4
Goto Forum:
  


Current Time: Fri Apr 19 16:05:47 GMT 2024

Powered by FUDForum. Page generated in 0.01617 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top