Unknown entity class error message even though the entity is marked with @Entity annotation

丶灬走出姿态 提交于 2019-12-03 13:07:13

How are you creating your EntityManager/Factory, is it managed or non-managed?

If it is not managed, then I believe that EclipseLink will not be notified in any way of a redeployment, so will still have the old EntityManagerFactory cached as it is never closed. Can you ensure that you close the EntityManagerFactory after the hot deploy?

You can make the persistence unit a managed persistence unit, that may resolve the issue.

Either way, please log a bug for this with details in EclipseLink and Glassfish, as this issue should be tracked.

I think this may be the bug, https://bugs.eclipse.org/bugs/show_bug.cgi?id=326552

Please vote for this bug, and include your information in it.

David O'Meara

The solution here is to use JPA 1.0 if 2.0 is not required.

Today i faced the same proble, but i corrected in persistence.xml

  1. Please check with entity class name and package are correctly defined in persistence.xml.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!