WFLYCTL0412:未安装的必需服务: [英] WFLYCTL0412: Required services that are not installed:
问题描述
我正在尝试在 Wildfly 10.0 中添加数据源,但是当我测试连接时,抛出的错误消息是:
I'm trying to add a datasource in Wildfly 10.0, but when i test connection this the error message that throws:
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"}
}
来自服务器日志的错误:
The error from the server log:
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 复制相同的配置文件
i'm replicating the same configuration files from standalone.xml and module.xml
这是我如何在 standalone.xml 中设置数据源的部分内容:
here is part how i set up the datasource in 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:
and the 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.
I have a postgresql-9.2-1004.jdbc3.jar in the deployment folder.
为什么会出现这个错误?我可能忘记配置什么?
Why this error appears? what i could have forgotten to config?
推荐答案
驱动程序 jar 应该在模块文件夹中,而不是在部署文件夹中,因为您在编写时暗示了这一点:
The driver jar should be in the module folder not in the deployment folder as you are implying this when you wrote :
<resources>
<resource-root path="postgresql-9.2-1004.jdbc3.jar"/>
</resources>
这篇关于WFLYCTL0412:未安装的必需服务:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!