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

前端 未结 3 1017
借酒劲吻你
借酒劲吻你 2021-02-15 02:27

I am building REST web app using Netbean6.9.1 and JPA EclipseLink.

The issue I\'m facing is even though my entity class MasatoTable is marked with Entity annotation, I g

3条回答
  •  孤街浪徒
    2021-02-15 03:11

    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.

提交回复
热议问题