1

I am having the following error:

15:02:34,434 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "sqlserver")
]) - failure description: "WFLYJCA0034: Unable to instantiate driver class \"com.microsoft.jdbc.sqlserver.SQLServerDriver\". See log (WARN) for more details"

The module.xml in $JBOSS_HOME\modules\com\microsoft\sqlserver\main:

<module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver" slot="main">

    <resources>
        <resource-root path="sqljdbc42.jar"/>
    </resources>

    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>

This is the content of sqljdbc42.jar

content_of_sqljdbc42

And the driver definition in standalone.xml

<driver name="sqlserver" module="com.microsoft.sqlserver">
    <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
</driver>

Please help me find out what I'm not seeing

UPDATE:

For historic context: the "com.microsoft.jdbc.sqlserver" package is from the old SQL Server 2000 JDBC driver, they changed it somewhere around 2005 to "com.microsoft.sqlserver.jdbc" by Mark Rotteveel

Carlos Laspina
  • 2,013
  • 4
  • 27
  • 44

1 Answers1

4

From what i can see from the jar content the class package in your driver is wrong, try with

<driver name="sqlserver" module="com.microsoft.sqlserver">
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
</driver>
David Florez
  • 1,460
  • 2
  • 13
  • 26
  • I tried this again, apparently when I refreshed I did not take the changes. Your solution is correct. Thank you – Carlos Laspina May 23 '17 at 19:48
  • For historic context: the `"com,microsoft.jdbc.sqlserver"` package is from the old SQL Server 2000 JDBC driver, they changed it somewhere around 2005 to `"com.microsoft.sqlserver.jdbc"`. – Mark Rotteveel May 23 '17 at 19:52