Wildfly 无法加载 Oracle 驱动程序的模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35371584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:09:40  来源:igfitidea点击:

Wildfly Failed to Load Module for Oracle Driver

oraclejdbcwildflyoracle12cwildfly-10

提问by ArtOfWarfare

I'm attempting to add an Oracle DB datasource to Wildfly 10. Here's what I have:

我正在尝试将 Oracle DB 数据源添加到 Wildfly 10。这是我所拥有的:

<wildfly-home>\modules\com\oracle\ojdbc6\main\
                                              module.xml
                                              ojdbc6.jar

module.xml

模块.xml

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:Wildfly:module:1.0" name="com.oracle.ojdbc6">
    <resources>
        <resource-root path="ojdbc6.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.resource.api"/>
        <module name="javax.transaction.api"/> <!-- See * below -->
   </dependencies>
</module>

* I have tried both with and without the line <module name="javax.transaction.api/>. Some examples I've found online include it. Some do not. It seems to make no difference with whether the error occurs or not.

* 我试过有线和没有线<module name="javax.transaction.api/>。我在网上找到的一些例子包括它。有些没有。似乎与是否发生错误没有区别。

ojdbc6.jarwas copied from <oracle-home>\jdbc\lib\ojdbc6.jar.

ojdbc6.jar是从<oracle-home>\jdbc\lib\ojdbc6.jar.

I have modified <wildfly-home>\standalone\configuration\standalone.xmlto include this within the <drivers>tag:

我已修改<wildfly-home>\standalone\configuration\standalone.xml以将其包含在<drivers>标签中:

<driver name="oraclethin" module="com.oracle.ojdbc6">
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>

This error message is being spat out when I cdinto <wildfly-home>\binand run .\standalone.bat:

当我cd进入<wildfly-home>\bin并运行时,会吐出此错误消息.\standalone.bat

15:17:13,415 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "oraclethin")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.oracle.ojdbc6]"

I've triple checked the spelling on everything. I've tried taking out some lines (and putting them back when nothing changes). Is anyone seeing what I'm missing?

我已经三重检查了所有内容的拼写。我试过取出一些线(并在没有任何变化时将它们放回去)。有没有人看到我想念的东西?

采纳答案by user140547

回答by Ziv.Ti

what solve the issue for me was to enlarge the timeout connection on the standalone.xml file on jboss

对我来说解决问题的是扩大jboss上standalone.xml文件的超时连接

<system-properties>
...
        <property name="jboss.as.management.blocking.timeout" value="6000"/>
    </system-properties>