无法在 Wildfly 10 中实例化驱动程序 SQLServerDriver

Unable to instantiate driver SQLServerDriver in Wildfly 10

我遇到以下错误:

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"

$JBOSS_HOME\modules\com\microsoft\sqlserver\main中的module.xml:

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

这是sqljdbc42.jar

的内容

以及standalone.xml

中的驱动定义
<driver name="sqlserver" module="com.microsoft.sqlserver">
    <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
</driver>

请帮我找出我没看到的东西

更新:

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

根据我从 jar 内容中可以看出,您的驱动程序中的 class 包有误,请尝试

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