Can't create EntityManager
- by bovo
New to EJB3, please help/explain.
Inside a session bean I declare an EntityManager as follow
@PersistenceContext(unitName="ScheduleUnit")
private EntityManager em;
and this works. But when I do this
private EntityManager em;
private EntityManagerFactory emf;
public void myFunction() {
emf = Persistence.createEntityManagerFactory("ScheduleUnit");
em = emf.createEntityManager();
}
I get the following error:
A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property