No Persistence provider for EntityManager named

前端 未结 30 2425
甜味超标
甜味超标 2020-11-22 03:45

I have my persistence.xml with the same name using TopLink under the META-INF directory. Then, I have my code calling it with:

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 04:46

    There is another point: If you face this problem within an Eclipse RCP environment, you might have to change the Factory generation from Persistence.createEntityManagerFactory to new PersistenceProvider().createEntityManagerFactory

    see ECF for a detailed discussion on this.

提交回复
热议问题