This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
javax.persistence.PersistenceException: No Persistence provider for EntityManager named EmployeePersistentUnit
Further in stateless bean which I have created to access entity if I use this code
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("EmployeePersistentUnit");
EntityManager em1= entityManagerFactory.createEntityManager();
@PersistenceContext(unitName = "EmployeePersistentUnit")
private EntityManager entityManager;
Then also it works fine …. (I am using JBOSS with eclipse )
So my doubt was if I want to access Entity bean from some standalone client( and not using starteless or stateful bean) how can I do that ?
Please forgive me …I know there would be so many simple mistakes or silly question or observation which I might have done …..since I am beginner in EJB world