JAVA - 将现有动态 Web 项目配置为 JPA 后无法部署

JAVA - 将现有动态 Web 项目配置为 JPA 后无法部署

我有一个使用 Glassfish 5 运行的 Java Dynamic Web 项目。将其配置为 JPA 项目(使用 EclipseLink)后,我无法部署它。我收到以下错误:

    cannot Deploy EcommerceAdmin
        deploy is failing=Error occurred during deployment: 
    Exception while loading the app : java.lang.IllegalStateException: 
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
     java.lang.RuntimeException: 
    javax.faces.FacesException: Unable to find CDI BeanManager. 
Please see server.log for more details.

我的 persistence.xml 是这样的:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
    <persistence-unit name="EcommerceAdmin" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <jta-data-source>TIWDS</jta-data-source>
        <properties>
            <property name="eclipselink.logging.level" value="FINE"/>
            <property name="javax.persistence.schema-generation.database.action" value="create"/>
            <property name="eclipselink.logging.parameters" value="true"/>
        </properties>
    </persistence-unit>
</persistence>

相关内容