Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.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
Jsf 无法解析org.eclipse.persistence.exceptions.EntityManagerSetupException_Jsf_Maven_Jpa_Ejb_Javabeans - Fatal编程技术网

Jsf 无法解析org.eclipse.persistence.exceptions.EntityManagerSetupException

Jsf 无法解析org.eclipse.persistence.exceptions.EntityManagerSetupException,jsf,maven,jpa,ejb,javabeans,Jsf,Maven,Jpa,Ejb,Javabeans,我正在尝试运行maven项目,我能够部署该项目,但在部署该项目后,当我单击任何函数执行操作时,它会显示以下异常: root cause: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Attempted

我正在尝试运行maven项目,我能够部署该项目,但在部署该项目后,当我单击任何函数执行操作时,它会显示以下异常:

root cause:
Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Attempted to deploy PersistenceUnit [DBUnit] while being in the wrong state [DeployFailed]. Close all factories for this PersistenceUnit.
我已尝试重新部署和重新启动glassfish,但无法解决此问题。有关更多信息,我还将发布我的
persistence.xml
文件和
服务器日志

persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence 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"
             version="2.0">

    <persistence-unit name="EC-Assignment" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>jdbc/Assignment2</jta-data-source>

        <class>org.beginningee6.book.Book</class>
        <class>org.beginningee6.book.CD</class>
        <class>org.beginningee6.book.Item</class>
        <class>org.beginningee6.book.customer.Customer</class>


        <properties>
            <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
            <property name="eclipselink.logging.level" value="INFO"/>




        </properties>
    </persistence-unit>
</persistence>

任何帮助都将不胜感激。

我通过更改
持久化单元的名称成功地解决了上述错误。可以使用多个名称。但是,当我摆脱了这个异常,现在又出现了一个新的错误。错误如下:

root cause

java.lang.VerifyError: Expecting a stackmap frame at branch target 18 

in method org.beginningee6.book.Item._persistence_isAttributeFetched(Ljava/lang/String;)Z at offset
我对此进行了研究,发现通过添加
-XX:-UseSplitVerifier
可以解决这个问题。我添加了这个变量,但仍然无法消除这个错误

root cause

java.lang.VerifyError: Expecting a stackmap frame at branch target 18 

in method org.beginningee6.book.Item._persistence_isAttributeFetched(Ljava/lang/String;)Z at offset