您好我已經在EJB 3.0持久性的glassfish服務器上開發了我的Java應用程序。在我的本地機器上,應用程序運行正常並且完美地保存了數據。然而,當我部署它在Linux服務器上,每當我堅持任何數據它給了我這個EJB異常錯誤:服務器上的實體管理器錯誤?
Caused by: Java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory.
這裏是我的persistence.xml文件:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="MyPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/security</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.ddl-generation" value="create-tables" />
</properties>
</persistence-unit>
</persistence>
什麼事情possbily導致這個?
PS:我使用Glassfish 3.1.43,EJB 3.0