WildFly(JBoss)下的JTDS模块 [英] JTDS module under WildFly (JBoss)

查看:95
本文介绍了WildFly(JBoss)下的JTDS模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正忙于从JBoss 7.1.1升级到Wildfly 8.0.0.Beta1.我在JBoss下使用JTDS数据库驱动程序没有任何问题,但是在WildFly下却无法正常工作.

I am busy upgrading from JBoss 7.1.1 to Wildfly 8.0.0.Beta1. I was using the JTDS database driver under JBoss without problems, but it is not working under WildFly.

我在WildFly安装中的modules下创建了/net/sourceforge/jtds/main/文件夹结构,并添加了module.xml文件,但是Wildfly似乎没有选择它.

I have creates the /net/sourceforge/jtds/main/ folder structure under modules in my WildFly installation and added the module.xml file, but Wildfly doesn't seem to be picking it up.

我也尝试过/modules/system/layers/base/文件夹,因为这是WildFly下的一个新文件夹,但这也不起作用,我也下载了最新的JTDS .JAR文件.

I have also tried the /modules/system/layers/base/ folder as this is a new one under WildFly, but that doesn't work either and I have downloaded the latest JTDS .JAR file too.

启动Wildfly时出现的错误是:

The error I get when I start Wildfly is:

ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SCI_ODS_sql2")
]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
    "jboss.data-source.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]",
    "jboss.driver-demander.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]"
]}
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "SCI_ODS_sql2")
]) - failure description: {
    "JBAS014771: Services with missing/unavailable dependencies" => [
        "jboss.data-source.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]",
        "jboss.driver-demander.java:jboss/datasources/SCI_ODS is missing [jboss.jdbc-driver.JTDS]"
    ],
    "JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {
        "Services that were unable to start:" => [
            "jboss.data-source.reference-factory.SCI_ODS_sql2",
            "jboss.naming.context.java.jboss.datasources.SCI_ODS"
        ],
        "Services that may be the cause:" => ["jboss.jdbc-driver.JTDS"]
    }
}

如果我运行/subsystem=datasources:installed-drivers-list uon jboss-cli.sh,它将仅显示默认安装的h2驱动程序,而不显示JTDS的驱动程序.

If I run /subsystem=datasources:installed-drivers-list uon jboss-cli.sh it only shows the h2 driver that is installed by default and not the JTDS one.

推荐答案

我没有在standalone.xml中正确设置驱动程序.我已经说服自己,我已经做到了.新增:

I hadn't setup the driver in standalone.xml properly. I had convinced myself that I'd done that already. Added:

 <driver name="JTDS" module="net.sourceforge.jtds">
    <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
    <xa-datasource-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</xa-datasource-class>
 </driver>

这篇关于WildFly(JBoss)下的JTDS模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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