• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to fix java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName

 
James P Dean
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn JSP and servlets by making a project. My goal is NOT to focus on JPA, ORM and persistence or even EJB for now. So, please do not tell me to read a tutorial or book on that. Unfortunately, I am not supposed to use SQL queries to interact with the database. Instead, I used pre-written JPA code to manage the persistence while I focus on jsp and servlets.

When I run my project, I get the error - java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName AffableBeanPU. My project is located at - https://github.com/double-whammy/affablebean.git Download as zip button is on bottom right corner.

Note - My persistence.xml file IS inside the META-INF folder. I checked and built my project again. So that reason can be ruled out.

I googled and none of the solutions were of help. How do I fix this error ?



Exception:



Persistence.xml:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic