gpt4 book ai didi

jdbc - wildfly - 安装 postgres 驱动程序 jar

转载 作者:行者123 更新时间:2023-12-02 04:00:06 27 4
gpt4 key购买 nike

我在安装 postgres 驱动程序时遇到困难。我尝试了很多事情:

  1. https://docs.jboss.org/author/display/WFLY10/Application+deployment

    a.尝试“部署”JAR(从 CLI 和管理控制台 UI)

  2. https://sites.google.com/site/jmdstips/jboss-wildfly/postgresql-on-wildfly---xa-datasource

    a.尝试将模块定义放入modules/org/postgresql ...

    b.尝试将模块定义放入modules/system/layers/base/org/postgresql

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.postgres">
<resources>
<resource-root path="postgresql-9.4.1212.jre7.jar" />
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>

还有:

<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgresql" module="org.postgresql">
<datasource-class>org.postgresql.Driver</datasource-class>
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>

完成所有这些之后,我收到此错误。所以,我认为 Wildfly 可以“看到”该模块,但有些地方出了问题。

23:24:15,889 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "postgresql")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [org.postgresql]"

最佳答案

简短回答:将驱动程序放在/wildfly/standalone/deployments文件夹中,它会自动部署驱动程序

关于jdbc - wildfly - 安装 postgres 驱动程序 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42289446/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com