我试图配置orientdb作为Wildfly9的数据源并且没有获取到位置。配置OrientDb作为wildfly中的数据源的问题
17:12:22,344 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "AccessControlDS")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.data-source.java:jboss/datasources/AccessControlDS is missing [jboss.jdbc-driver.orientdb]",
"jboss.driver-demander.java:jboss/datasources/AccessControlDS is missing [jboss.jdbc-driver.orientdb]"
]}
的定向JDBC驱动程序(orientdb-JDBC-2.1.12-all.jar在)安装在wildfly下wildfly /模块/系统/层/基层/ COM/orientdb /主要的模块。
module.xml
<module xmlns="urn:jboss:module:1.3" name="com.orientdb">
<resources>
<resource-root path="orientdb-jdbc-2.1.12-all.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
独立-full.xml
<subsystem xmlns="urn:jboss:domain:datasources:3.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/AccessControlDS" pool-name="AccessControlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:orient:remote:orientdb/access-control</connection-url>
<driver>orientdb</driver>
<security>
<user-name>xxxx</user-name>
<password>yyyy</password>
</security>
</datasource>
</datasources>
<drivers>
<driver name="orientdb" module="com.orientdb">
<driver-class>com.orientchnologies.orient.jdbc.OrientJdbcDriver</driver-class>
<datasource-class>com.orientechnologies.orient.jdbc.OrientDataSource</datasource-class>
</driver>
</drivers>
</subsystem>
查询数据源返回在JBoss控制台: /子系统=数据源:读资源(递归=真)
{
"outcome" => "success",
"result" => {
"data-source" => {"AccessControlDS" => {
"allocation-retry" => undefined,
"allocation-retry-wait-millis" => undefined,
"allow-multiple-users" => false,
"background-validation" => undefined,
"background-validation-millis" => undefined,
"blocking-timeout-wait-millis" => undefined,
"capacity-decrementer-class" => undefined,
"capacity-decrementer-properties" => undefined,
"capacity-incrementer-class" => undefined,
"capacity-incrementer-properties" => undefined,
"check-valid-connection-sql" => undefined,
"connectable" => false,
"connection-listener-class" => undefined,
"connection-listener-property" => undefined,
"connection-properties" => undefined,
"connection-url" => "jdbc:orient:remote:orientdb/access-control",
"datasource-class" => undefined,
"driver-class" => undefined,
"driver-name" => "orientdb",
"enabled" => true,
"exception-sorter-class-name" => undefined,
"exception-sorter-properties" => undefined,
"flush-strategy" => undefined,
"idle-timeout-minutes" => undefined,
"initial-pool-size" => undefined,
"jndi-name" => "java:jboss/datasources/AccessControlDS",
"jta" => true,
"max-pool-size" => undefined,
"min-pool-size" => undefined,
"new-connection-sql" => undefined,
"password" => "yyyy",
"pool-prefill" => undefined,
"pool-use-strict-min" => undefined,
"prepared-statements-cache-size" => undefined,
"query-timeout" => undefined,
"reauth-plugin-class-name" => undefined,
"reauth-plugin-properties" => undefined,
"security-domain" => undefined,
"set-tx-query-timeout" => false,
"share-prepared-statements" => false,
"spy" => false,
"stale-connection-checker-class-name" => undefined,
"stale-connection-checker-properties" => undefined,
"statistics-enabled" => false,
"track-statements" => "NOWARN",
"tracking" => false,
"transaction-isolation" => undefined,
"url-delimiter" => undefined,
"url-selector-strategy-class-name" => undefined,
"use-ccm" => true,
"use-fast-fail" => false,
"use-java-context" => true,
"use-try-lock" => undefined,
"user-name" => "xxxx",
"valid-connection-checker-class-name" => undefined,
"valid-connection-checker-properties" => undefined,
"validate-on-match" => undefined
}},
"jdbc-driver" => {"orientdb" => {
"deployment-name" => undefined,
"driver-class-name" => "com.orientchnologies.orient.jdbc.OrientJdbcDriver",
"driver-datasource-class-name" => "com.orientechnologies.orient.jdbc.OrientDataSource",
"driver-major-version" => undefined,
"driver-minor-version" => undefined,
"driver-module-name" => "com.orientdb",
"driver-name" => "orientdb",
"driver-xa-datasource-class-name" => undefined,
"jdbc-compliant" => undefined,
"module-slot" => undefined,
"profile" => undefined,
"xa-datasource-class" => undefined
}},
"xa-data-source" => undefined
}
}
嗨,我不是wildFLy的专家,也不是JEE,但在最后一个JSON中,我可以看到下面这行:“driver-datasource-class-name”=>未定义,但似乎在独立xml上正确定义我不知道它是否有错误。此外,你可以访问东方服务器和名为“东方DB”的服务器上的数据库? from your remote remote:orientdb/access-control OrientDB服务器部署的服务器名为“orientdb”:这个符号名是否正确,并在DNS或主机文件上注册? –
Hi @RobertoFranchini,你是正确的观察:“driver-datasource-class-name”=>未定义。 Json来自上一步,我知道更新了json文件。 “orientdb”服务器可以由我们的DNS在内部解决。 wildfly和orientdb服务器正常运行。为了证明我已经写了一个小的单元测试,连接到orientdb并成功获取数据。问题是配置wildfly连接到orientdb,我没有找到任何文档或论坛讨论。 – tchoesang
我很抱歉,但我真的不知道如何帮助你。我认为最好的办法是用详细的程序来解决问题,并将wildFly下载到示例代码中。我知道,这是一项工作,但它有助于创建解决问题的快速途径。在此先感谢,R. –