Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未加载JPA persistence.xml_Jpa - Fatal编程技术网

未加载JPA persistence.xml

未加载JPA persistence.xml,jpa,Jpa,对于glassfish,我的persistence.xml不会加载 my.ear META-INF/persistence.xml lib/entities.jar <!-- no persistence.xml here --> 谢谢。我将尝试创建一个包含persistence.xml文件的.jar文件。然后将jar文件放在lib文件夹中。更多信息您的jpaentitymanagerfactorybean是什么样子的?我刚刚发现,将persistence.xml放

对于glassfish,我的persistence.xml不会加载

my.ear
    META-INF/persistence.xml
    lib/entities.jar <!-- no persistence.xml here -->

谢谢。

我将尝试创建一个包含persistence.xml文件的.jar文件。然后将jar文件放在lib文件夹中。更多信息

您的jpaentitymanagerfactorybean是什么样子的?我刚刚发现,将persistence.xml放在EAR的META-INF/中不是一种标准方法。有人能证实这一点吗?我创建了一个持久性归档,它可以正常工作。
Unable to retrieve EntityManagerFactory for unitName xxxPU