用于 sqlserver 的 jboss 7 AS 数据源 [英] jboss 7 AS datasource for sqlserver

查看:32
本文介绍了用于 sqlserver 的 jboss 7 AS 数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在独立模式下运行 jboss 并将 standalone.xml 中的数据源设置为以下内容:

I run jboss in standalone mode and have set my datasource in the standalone.xml to the following:

<datasource jndi-name="MyDenaliDS" pool-name="MyDenaliDs_Pool" enabled="true" jta="true" 
                                                   use-java-context="true" use-ccm="true">
    <connection-url>
        jdbc:sqlserver://myip:1433;databaseName=mydb;integratedSecurity=true
    </connection-url>
    <driver>
        sqljdbc
    </driver>
    <security>
        <user-name>
            username
        </user-name>
        <password>
            password
        </password>
    </security>
</datasource>
<drivers>
    <driver name="sqljdbc" module="com.microsoft.sqlserver.jdbc">
        <driver-class>
            com.microsoft.sqlserver.jdbc.SQLServerDataSource
        </driver-class>
    </driver>                    
</drivers>

在文件夹 %jbosshome%modulescommicrosoftsqlserverjdbc 我有 sqljdb4.jar 和以下 module.xml:

in the folder %jbosshome%modulescommicrosoftsqlserverjdbc I have the sqljdb4.jar and the following module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module name="com.microsoft.sqlserver.jdbc" xmlns="urn:jboss:module:1.0">
    <resources>
        <resource-root path="sqljdbc4.jar"/> 
     </resources>
     <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/> 
     </dependencies>
</module>

当我启动 jboss 时,它给了我以下错误:

When I start the jboss it gives me the following error:

> New missing/unsatisfied dependencies:    service
> jboss.jdbc-driver.sqljdbc (missing)

有人知道我做错了什么或遗漏了什么吗?

Anyone know what I've done incorrect or what I'm missing?

推荐答案

和你之前一样的错误

而不是 %jbosshome%modulescommicrosoftsqlserverjdbc

instead of %jbosshome%modulescommicrosoftsqlserverjdbc

试试 %jbosshome%modulescommicrosoftsqlserverjdbcmain

try %jbosshome%modulescommicrosoftsqlserverjdbcmain

然后把jdbc驱动的.jar和module.xml放在那里.

and put the .jar of the jdbc driver and the module.xml overthere.

这篇关于用于 sqlserver 的 jboss 7 AS 数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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