2

Developing web application under STS 3.4.0.RELEASE (Spring). I have working JPA example under Eclipse Juno and want to port it as part of Spring application. I have to copy persistence.xml file. Where should it be located exactly?

So far I get "javax.persistence.PersistenceException: No Persistence provider for EntityManager named ..." which may be related to location or may be not.

Is there a need for "provider" element and if so what should be the value? (It worked fine under Eclipse without that element).

Please Help!!!

2 Answers 2

1

Your persistence.xml is not valid and the EntityManagerFactory can't get created

Refer this similar question Cause of this Exception

Hope it helps..

Sign up to request clarification or add additional context in comments.

1 Comment

yes, one of many advice in that thread helped to move on. Is JPA in Spring implemented above Hibernate? It pulled several Hibernate classes. Current situation: javax.persistence.PersistenceException: [PersistenceUnit: JPA] Unable to configure EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:378)at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78) at javax.persistence.Persistence.createEntityManagerFactory(
0

The persistence.xml file should be placed in META-INF/persistence.xml in your classpath.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.