Reputation: 854
Hi everyone I am trying to use the sqlserver jdbc with the wildfly AP , but when I try to test the connection after the datasource I always get this error :
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mssql"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"org.wildfly.data-source.Eventis is missing [jboss.jdbc-driver.mssql]",
"jboss.driver-demander.java:/Eventis is missing [jboss.jdbc-driver.mssql]"
]
}}}
Here the content of the config files :
module.xml :
<module xmlns="urn:jboss:module:1.3" name="com.microsoft.sqlserver">
<resources>
<resource-root path="mssql-jdbc-6.4.0.jre8" />
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Standalone.xml :
<driver name="mssql" module="system.layers.base.com.microsoft.sqlserver">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
And finaly my jdbc jar file is located under this path :
wildfly-14.0.0.Final\modules\system\layers\base\com\microsoft\sqlserver\main
Upvotes: 0
Views: 2104
Reputation: 17760
Your module name is not correct. It should be com.microsoft.sqlserver
. The standalone.xml
snippet should look like:
<driver name="mssql" module="com.microsoft.sqlserver">
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
You can change this in CLI with the following command
/subsystem=datasources/jdbc-driver=mssql:remove
/subsystem=datasources/jdbc-driver=mssql:add(driver-name=mssql, driver-module-name="com.microsoft.sqlserver")
Upvotes: 1