首页 > 代码库 > Could not open JPA EntityManager for transaction; nested exception is java.lang.NullPointerException

Could not open JPA EntityManager for transaction; nested exception is java.lang.NullPointerException

1 <persistence-unit name="WebofficeOne" transaction-type="JTA ">

改为

1 <persistence-unit name="WebofficeOne" transaction-type="RESOURCE_LOCAL">

 JTA 在jee环境下运行

RESOURCE_LOCAL在jse环境下使用

Could not open JPA EntityManager for transaction; nested exception is java.lang.NullPointerException