【发布时间】:2016-01-09 22:56:20
【问题描述】:
我开始介绍 Wildfly 学习。
我已经下载了服务器的分发版。
现在我正在尝试配置数据源,但我看到以下错误:
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "PostgreDataSource")
],
"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:jboss/datasources/PostgreDataSource",
"rolled-back" => true
}
我的步骤:
1.创建文件夹wildfly-10.0.0.CR2\wildfly-10.0.0.CR2\modules\org\postgres\main并从\.m2\repository\postgresql\postgresql\9.0-801.jdbc4那里复制postgresql-9.0-801.jdbc4.jar。
2.创建的module.xml(在wildfly-10.0.0.CR2\wildfly-10.0.0.CR2\modules内):
内容如下:
<module xmlns="urn:jboss:module:1.0" name="org.postgres">
<resources>
<resource-root path="postgresql-9.0-801.jdbc4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
- 像这样修改了
standalone.xml(wildfly-10.0.0.CR2\wildfly-10.0.0.CR2\standalone\configuration)(对不起-我不知道如何复制xml以使其对其他用户可见(此处显示完整内容:http://collabedit.com/psk4a)):
请帮助理解我做错了什么?
【问题讨论】:
标签: java xml postgresql datasource wildfly