package com.em;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
public class EntityManagerClass {
public static EntityManager createEntity() {
System.out.println("EntityManager start");
**EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("idata");**
EntityManager entityManager = entityManagerFactory.createEntityManager();
System.out.println("EntityManager"+entityManager);
return entityManager;
}
}
嗨,我是java的新手。 当我在JPA中使用ENTITYMANAGERFACTORY时,我收到的错误如“线程中的异常”AWT-EventQueue-0“java.lang.IncompatibleClassChangeError:Implementing class”。 请帮忙解决这个问题。