JPA - Unknown entity bean class

前端 未结 5 1766
不知归路
不知归路 2020-12-19 13:59

Hopefully, I can explain this issue properly. I have 3 classes that deals with my entities.

@MappedSuperclass
public abstract class Swab implements ISwab {
         


        
5条回答
  •  有刺的猬
    2020-12-19 14:42

    Mario was right when he mentions EntityManagerFactory here.

    Both:

    java.lang.IllegalArgumentException: Unknown entity bean class...

    and

    java.lang.IllegalStateException: This web container has not yet been started...

    These exceptions occur when you redeploy a web application multiple times but didn't close EntityManagerFactory properly.

    follow this instruction to register ServletContextListener and this instruction to close EntityManagerFactory properly.

提交回复
热议问题