服务器启动错误消息是:
16:08:37,829 ERROR [org.jboss.as.controller.management-operation] (ServerService
Thread Pool -- 27) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "firebird")
]) - failure description: "JBAS010441: Failed to load module for driver [org.fir
ebirdsql]"
内容 module.xml :
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.firebirdsql">
<resources>
<resource-root path="jaybird-2.2.5.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.resource"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
standalone.xml 中的驱动程序定义:
<driver name="firebird" module="org.firebirdsql">
<driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
</driver>
(基于http://masterjboss.blogspot.de/2014/03/how-to-configure-mysql-jdbc-driver-in.html)
一个类似的问题(没有接受答案):Db2 Driver/Datasource setup on wildfly: Failed to load module for driver [com.ibm]
2 回答
在依赖项部分中将
<module name="javax.resource"/>
替换为<module name="javax.resource.api"/>
.我安装了WildFly 8.1并添加了以下模块:
请注意,这与您链接到的教程中使用的位置不匹配 . 教程 - 错误地 - 在
modules\system\layers\base
而不是modules\
中根用户模块,但是当我将模块放在那里时它也可以工作 .我的
module.xml
定义有内容:我完全按照您发布的内容将
standalone.xml
添加了驱动程序条目 . 然后在管理控制台中添加了一个数据源,并测试了连接 .这有效 . 我在评论中的早期理论认为,由于Web Profile不包括资源连接器,它不适合您,这似乎是错误的 . 当WildFly在Java 7上运行时,我还使用Java 8版本的Jaybird进行了测试,但是这给出了
UnsupportedClassVersionError
.我能够在您的问题中得到错误的唯一方法是故意错放模块(例如,完全删除它,在文件夹名称中出现拼写错误,或将其放在错误的位置) . 我建议你仔细检查你的模块位置(见上文) .
有关特定问题的解决方案,请参阅the answer by asohun . 我将保留这个答案,因为它包含正确的配置和产生相同错误的替代故障模式 .