部署war到wildfly 19

a9wyjsp7  于 2021-07-12  发布在  Java
关注(0)|答案(0)|浏览(298)

我正试图部署一个war文件到wildfly 19,但收到一个通信失败错误。几天来我一直在想这个问题,但都没有成功。谷歌搜索并没有产生任何有意义的结果:—(。我尝试了一些建议,比如将地址从localhost改为127.0.0.1等等,但没有成功。下面是我得到的错误。
我有wildfly 19和mariadb 10的天气学(diskstation)。我配置了一个名为pmprodds的数据源,其连接url为: jdbc:mysql://localhost:3307/pmprod?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=America/Chicago 谢谢你的帮助!!!
这是我的persistence.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2"
    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_2.xsd">
    <persistence-unit name="portfoliomanager"
        transaction-type="JTA">
        <jta-data-source>java:/PMProdDS</jta-data-source>
        <!-- <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> -->
        <properties>
            <property name="hibernate.show_sql" value="false" />
            <property name="hibernate.dialect"
                value="org.hibernate.dialect.MySQL8Dialect" />
            <property
                name="javax.persistence.schema-generation.database.action"
                value="update" />
            <property name="hibernate.format_sql" value="false" />
        </properties>
    </persistence-unit>
</persistence>

下面是我得到的错误。。。

{"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"portfoliomanager.war#portfoliomanager\"" => "javax.persistence.PersistenceException: [PersistenceUnit: portfoliomanager] Unable to build Hibernate SessionFactory
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: portfoliomanager] Unable to build Hibernate SessionFactory
    Caused by: org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
    Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/PMProdDS
    Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/PMProdDS
    Caused by: javax.resource.ResourceException: IJ031084: Unable to create connection
    Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    Caused by: java.net.ConnectException: Connection refused (Connection refused)"}}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题