[jboss-user] [JBoss Seam] - Re: TestNG with hibernate
cormet
do-not-reply at jboss.com
Tue Jun 12 04:24:33 EDT 2007
Hi Chris,
Thx for the reply. I tried it but i gives me error. here are my simple code:
| EntityManagerFactory emf = Persistence.createEntityManagerFactory("mySession");
| EntityManager em = emf.createEntityManager();
| ManagedHibernateSession session = (ManagedHibernateSession) em.getDelegate();
|
and here are the error:
| javax.persistence.PersistenceException: No Persistence provider for EntityManager named mySession
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
| at com.medansoft.controller.GeneralJournalActionTest.createGeneralJournalTest(GeneralJournalActionTest.java:19)
| ... Removed 21 stack frames
|
| ===============================================
| GeneralJournalAction
| Tests run: 1, Failures: 1, Skips: 0
| ===============================================
|
|
| ===============================================
| Accounting System Test Suite
| Total tests run: 1, Failures: 1, Skips: 0
| ===============================================
|
As I named my hibernate session -- mySession in component.xml...
Any help will be appreciated...
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053379#4053379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053379
More information about the jboss-user
mailing list