I am getting following exception when exec'ing following code in testNG test case:
@Configuration(beforeTestClass=true)
public void init()
{
emf = Persistence.createEntityManagerFactory("RSDB");
}
javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource
I realized that b/c I am not running inside a JavaEE app server (just in Eclipse with J2SE), the JNDI lookup is not available or won't work.
I was advise to create a new persistence.xml specifically for testing purposes. This persistence.xml example (not using datasource) is not available in Gavy's example at following link:
http://docs.jboss.com/seam/1.1GA/reference/en/html/testing.html
Anybody know how to do this? thx.