3

I am trying to setup Apache Ignite Cluster with WildFly 10.1.0, so I'm able to use JPA with Ignite. I have issues configuring the JDBC driver.

What I have done so far:

standalone-full.xml

<datasource jta="false" jndi-name="java:jboss/datasources/IgniteDS" pool-name="IgniteDS" enabled="true">
   <connection-url>jdbc:ignite:thin://172.X.X.146,172.X.X.147,172.X.X.148</connection-url>
   <driver>ignite</driver>
</datasource>

Later in the same file I set-up the driver

<driver name="ignite" module="org.ignite.jdbc">
    <driver-class>org.apache.ignite.IgniteJdbcThinDriver</driver-class>
</driver>

Ignite Module

In {WILDFLY_HOME}/modules I created following structure enter image description here

module.xml

<?xml version="1.0" ?>
<module xmlns="urn:jboss:module:1.1" name="org.ignite.jdbc">
    <resources>
        <resource-root path="ignite-core-2.6.0.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>

Unfortunately I get following error in WildFly log when I start the server

11:43:31,253 ERROR [org.jboss.as.controller.management-operation] 
(Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: 
([
    ("subsystem" => "datasources"),
    ("data-source" => "IgniteDS")
]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => 
["jboss.jdbc-driver.ignite"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.driver-demander.java:jboss/datasources/IgniteDS is missing [jboss.jdbc-driver.ignite]",
        "org.wildfly.data-source.IgniteDS is missing [jboss.jdbc-driver.ignite]"
    ]
}
11:43:31,263 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: 
([
    ("subsystem" => "datasources"),
    ("data-source" => "IgniteDS")
]) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => [
        "jboss.jdbc-driver.ignite",
        "jboss.jdbc-driver.ignite"
    ],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => [
        "jboss.driver-demander.java:jboss/datasources/IgniteDS is missing [jboss.jdbc-driver.ignite]",
        "org.wildfly.data-source.IgniteDS is missing [jboss.jdbc-driver.ignite]",
        "org.wildfly.data-source.IgniteDS is missing [jboss.jdbc-driver.ignite]"
    ]
}

Your help is highly appreciated

filip_j
  • 993
  • 1
  • 14
  • 22

3 Answers3

1
  1. Beware you have 2 kinds or drivers, the regular one (driver-class), or the XA one (xa-datasource):

      <driver name="h2" module="com.h2database.h2">
          <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
      </driver>
      <driver name="postgresql" module="org.postgresql">
          <driver-class>org.postgresql.Driver</driver-class>
      </driver>
    
  2. I've sometimes seen conf where the driver class name is...repeated inside the datasource declaration (but do not ask me why ;-)):

 <datasource jta="false" jndi-name="java:jboss/datasources/sqlDataSource" pool-name="sqlDataSource" enabled="true" use-ccm="false">
     <connection-url>... </connection-url>
     <driver-class>com.sybase.jdbc4.jdbc.SybDriver</driver-class>
     <driver>sybase</driver>

  1. Ultimately, give a try with jta="false" (on datasource level) in case it makes some differences (I doubt but)
TacheDeChoco
  • 3,683
  • 1
  • 14
  • 17
0

May be not the root cause, but the namespace of your "module.xml" file is not correct (urn should be of version 1.3 for WF 10):

<module xmlns="urn:jboss:module:1.3" name="org.ignite.jdbc"> 

This may prevent the module from being loaded ?

TacheDeChoco
  • 3,683
  • 1
  • 14
  • 17
0

The problem was in the folder structure I've used in {WILDFLY_HOME}/modules. My path is org/ignite/main which means the name in module.xml should be changed from name="org.ignite.jdbc" to name="org.ignite"

Same change applies in driver tag in standalone-full.xml

filip_j
  • 993
  • 1
  • 14
  • 22