I am trying to use TestNG to test persist operations in classes extended from 
EntityHome. I create an Entity Manager and use this to set the entity Manger in 
Entity Home. I use the persist method from EntityHome , but when i try to 
commit the transaction i get 

anonymous wrote :  java.lang.IllegalStateException: No application context 
active
anonymous wrote :   [testng] Hibernate: insert into X2USER (name, id) values 
(?, ?)
  |    [testng] 31-May-2007 16:43:49 org.hibernate.impl.SessionFactoryImpl close
  |    [testng] INFO: closing
  |    [testng] 31-May-2007 16:43:49 
org.hibernate.connection.DriverManagerConnectionProvider close
  |    [testng] INFO: cleaning up connection pool: jdbc:oracle:thin:@********
  |    [testng] Creating C:\dev\workspace\testp1\test-report\Currency Test.html
  |    [testng] FAILED: test.RegisterActionTest.testRegisterAction()
  |    [testng] java.lang.IllegalStateException: No application context active

I don't get this problem if I just use entity manager outside of EntityHome.
Is this a feasible thing to try to do ? 
 


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050233
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to