首页 文章

无法执行JPA架构:service jboss.persistenceunit

提问于
浏览
1

我有一个Entreprise应用程序项目EAR:(WAR JAR EJB)当我在Wildfly上单独部署EJB项目时,我没有任何持久性问题,但是当我部署Ear时,我收到以下错误:

21:13:24,101 ERROR [org.jboss.msc.service.fail](ServerService线程池 - 52)MSC000001:无法启动服务jboss.persistenceunit . “BankEar.ear / EJBBANK.jar #persist”:org . 服务jboss.persistenceunit中的jboss.msc.service.StartException . “BankEar.ear / EJBBANK.jar #persist”:javax.persistence.PersistenceException:无法执行JPA模式生成create命令[create table Compte(code bigint not null,date datetime,solde double precision not null,primary key(code))] 21:13:24,654 WARN [org.jboss.as.jpa](Controller Boot Thread)JBAS011411:意外的问题收集统计信息:java.lang.IllegalStateException:JBAS011477:持久性单元'BankEar.ear / EJBBANK.jar #persist'不可用JBAS014777:无法启动的服务:service jboss.persistenceunit . “BankEar.ear / EJBBANK.jar #persist”

这是我的Persistan.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="persist" transaction-type="JTA">
        <jta-data-source>java:jboss/datasources/jeeDataSource</jta-data-source>
        <class>com.entity.Compte</class>
        <properties>
        <property name="javax.persistence.schema-generation.database.action"
           value="drop-and-create"/>
        </properties>
    </persistence-unit>
</persistence>

1 回答

  • 0

    我通过使用Property Acces-Type重新创建JPA实体来解决此错误谢谢!

相关问题