I am getting the following error when I am using Jboss 4.2.3 GA and configured my ms-sql.ds file. I created an Entity Bean EJB3 and I am trying to access that Entity bean from EJB 2.1 Session Bean. First of all, I wanted to check if it is possible. Because when I use EntityManager or EntityManagerFactory,
my EntityManager is comming as null. Also instead if I use EntityManagerFactory, it gives
an error saying:
javax.persistence.PersistenceException: No Persistence provider for EntityManager named EjbComponentPU
Below is my class
public class TestBean implements SessionBean {
//pass persistence unit to entityManager.
@PersistenceContext(unitName="EjbComponentPU")
private EntityManager entitymanager;
My Project folder structure is:
src - has the all the packages.
Inside that I have META-INF folder which has the persistence.xml file
Thanks for any help.