0

I am trying to configure orientdb as a datasource for Wildfly9 and getting no where.

    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]"
]}

The orient jdbc driver (orientdb-jdbc-2.1.12-all.jar) is installed as a module in wildfly under wildfly/modules/system/layers/base/com/orientdb/main.

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>

standalone-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>

Querying the jboss console for data source returns: /subsystem=datasources:read-resource(recursive=true)

{
    "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
    }
}
Choesang
  • 1,225
  • 1
  • 14
  • 23
  • Hi, I'm not an expert of wildFLy nor JEE, but in the last json I can see the line: "driver-datasource-class-name" => undefined, but it seems correctly defined on the standalone xml and I don't know if its an error. Moreover, can you reach the orient server and the db on the server named "orientdb" ? From your url remote:orientdb/access-control the server where OrientDB server is deployed is named "orientdb": is this symbolic name right and registered on DNS or hosts file? – Roberto Franchini Mar 03 '16 at 20:33
  • Hi @RobertoFranchini, You are correct to observe: "driver-datasource-class-name" => undefined. The Json was from a previous step and i have know updated the json file. The "orientdb" server can be internally resolved by our DNS. The wildfly and the orientdb server are running correctly. To prove that i have written a small unit test that connects to the orientdb and fetches data successfully. The issue is to configure wildfly to connect to the orientdb and there i dont find any documentations or forum discussions. – Choesang Mar 04 '16 at 09:13
  • 1
    I'm sorry, but I really don't know how to help you. I think the best thing is to open an issue with a detailed procedure to replicate the problem, with instructions from downloading wildFly to sample code. I know, it's a work, but it will help to create a fast path to problem resolution. Thanks in advance, R. – Roberto Franchini Mar 09 '16 at 10:05
  • I will post an issue on orientdb (github) with the procedure to replicate. I hope that it will help others who want to configure orientdb with application containers. – Choesang Mar 09 '16 at 10:47

1 Answers1

2

As an alternative, try using the resource adapter "orient-rar-0.3.0.rar" in WildFly8.2.0.Final. https://ops4j1.jira.com/wiki/display/ORIENT/JCA+Resource+Adapter

J_D
  • 740
  • 8
  • 17
  • thanks for bringing this up, looks very good (actually this would be the preferred "JEE" way to integrate OrientDB), but sadly it it outdated and Orient didn't pick it up... – Gregor Jun 21 '16 at 10:22