数据源在 JBoss 7.2 中不工作
Datasource not working in JBoss 7.2
当我创建数据源时,无论使用何种方法创建数据源,都需要重新启动服务才能使其正常工作(standalone.xml、JBoss CLI、JBoss 管理控制台).附件是我为我的团队编写的程序(从我们的 Wiki space 导出)。数据源创建成功,但是当我测试连接时,我得到这个:
来自 JBoss 管理控制台
Unknown error
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "dsMyApp")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/dsMyApp",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
来自 JBoss CLI
JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/dsMyApp
如果我重新启动 JBoss 服务器,数据源工作正常(服务器、端口、用户名和密码都正确)。
有什么想法吗?
谢谢
The Quick Answer: YES, restarting makes a reload and then activates the datasource
我建议你使用 jboss-cli 重新加载(这是最快的方法)
我已经使用 jboss-cli 创建了我所有的数据源,而且我总是需要
执行此操作以允许它们工作。重新加载后,可以测试数据源连接。
/opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.119.116:9990 --commands="reload --host=master"
希望对您有所帮助
当我创建数据源时,无论使用何种方法创建数据源,都需要重新启动服务才能使其正常工作(standalone.xml、JBoss CLI、JBoss 管理控制台).附件是我为我的团队编写的程序(从我们的 Wiki space 导出)。数据源创建成功,但是当我测试连接时,我得到这个:
来自 JBoss 管理控制台
Unknown error
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "dsMyApp")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/dsMyApp",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
来自 JBoss CLI
JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/dsMyApp
如果我重新启动 JBoss 服务器,数据源工作正常(服务器、端口、用户名和密码都正确)。
有什么想法吗?
谢谢
The Quick Answer: YES, restarting makes a reload and then activates the datasource
我建议你使用 jboss-cli 重新加载(这是最快的方法)
我已经使用 jboss-cli 创建了我所有的数据源,而且我总是需要 执行此操作以允许它们工作。重新加载后,可以测试数据源连接。
/opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.119.116:9990 --commands="reload --host=master"
希望对您有所帮助