sqlserver的jboss 7 AS数据源 [英] jboss 7 AS datasource for sqlserver
问题描述
我以独立模式运行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%\modules\com\microsoft\sqlserver\jdbc\
中的
我有sqljdb4.jar
和以下module.xml
:
in the folder %jbosshome%\modules\com\microsoft\sqlserver\jdbc\
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?
推荐答案
像以前一样遇到了相同的错误
got the same error like you before
代替%jbosshome%\ modules \ com \ microsoft \ sqlserver \ jdbc \
instead of %jbosshome%\modules\com\microsoft\sqlserver\jdbc\
尝试%jbosshome%\ modules \ com \ microsoft \ sqlserver \ jdbc \ main
try %jbosshome%\modules\com\microsoft\sqlserver\jdbc\main
然后将jdbc驱动程序的.jar和module.xml放在上面.
and put the .jar of the jdbc driver and the module.xml overthere.
这篇关于sqlserver的jboss 7 AS数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!