Wildfly无法为Oracle驱动程序加载模块 [英] Wildfly Failed to Load Module for Oracle Driver

查看:671
本文介绍了Wildfly无法为Oracle驱动程序加载模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Oracle DB数据源添加到Wildfly10.这是我拥有的:

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

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

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

*我尝试了是否使用行<module name="javax.transaction.api/>.我在网上找到的一些例子包括它.有些没有.错误是否发生似乎无关紧要.

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

ojdbc6.jar .

我修改了<wildfly-home>\standalone\configuration\standalone.xml,将其包含在<drivers>标记内:

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

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

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

This error message is being spat out when I cd into <wildfly-home>\bin and run .\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?

推荐答案

使用xmlns="urn:jboss:module:1.0"

https://docs.jboss.org/author/display中所述/MODULES/Module +描述符

这篇关于Wildfly无法为Oracle驱动程序加载模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆