gpt4 book ai didi

wildfly - WFLYCTL0412 : Required services that are not installed:

转载 作者:行者123 更新时间:2023-12-03 20:45:07 40 4
gpt4 key购买 nike

我正在尝试在 Wildfly 10.0 中添加数据源,但是当我测试连接时,会抛出以下错误消息:

Unexpected HTTP response: 500

Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "PostgreCrawlazo")
],
"operation" => "test-connection-in-pool"
}

Response

Internal Server Error
{
"outcome" => "failed",
"failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName: java:/crawlazo",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}

服务器日志中的错误:
2016-09-01 16:28:40,524 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "PostgreCrawlazo")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.jdbc-driver.postgres",
"jboss.jdbc-driver.postgres"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:/crawlazo is missing [jboss.jdbc-driver.postgres]",
"org.wildfly.data-source.PostgreCrawlazo is missing [jboss.jdbc-driver.postgres]",
"org.wildfly.data-source.PostgreCrawlazo is missing [jboss.jdbc-driver.postgres]"
]
}

我正在从standalone.xml 和 module.xml 复制相同的配置文件

这是我在standalone.xml中设置数据源的部分内容:
 <datasource jndi-name="java:/crawlazo" pool-name="PostgreCrawlazo" enabled="true">
<connection-url>jdbc:postgresql://x.x.x.x:5432/crawlazo</connection-url>
<driver>postgres</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>40</max-pool-size>
</pool>
<security>
<user-name>someUser</user-name>
<password>somePasswd</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="postgres" module="org.postgres">
<driver-class>org.postgresql.Driver</driver-class>
</driver>
</drivers>

和module.xml:
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
<resources>
<resource-root path="postgresql-9.2-1004.jdbc3.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>

我在部署文件夹中有一个 postgresql-9.2-1004.jdbc3.jar。

为什么会出现这个错误?我可能忘记配置什么?

最佳答案

驱动程序 jar 应该在模块文件夹中,而不是在部署文件夹中,正如您在编写时暗示的那样:

<resources>
<resource-root path="postgresql-9.2-1004.jdbc3.jar"/>
</resources>

关于wildfly - WFLYCTL0412 : Required services that are not installed:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39281314/

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