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
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
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>
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>
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 ?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.