无法在Jboss AS 7上定义oracle数据源
问题描述:
我正在使用Jboss AS 7.1.1.final,并尝试添加一个oracle数据源:
I'm using Jboss AS 7.1.1.final and I'm trying to add an oracle Datasource:
<datasource jndi-name="java:jboss/datasources/DefaultDS"
pool-name="DefaultDS"
enabled="true"
use-java-context="true">
<connection-url>jdbc:oracle:oci@TNS_NAME</connection-url>
<driver>oracle</driver>
<security>
<user-name>username</user-name>
<password>pwd</password>
</security>
</datasource>
和驱动程序:
<driver name="oracle" module="com.oracle.ojdbc">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
但是当我启动服务器时,我得到:
But when I start the server I get:
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.data-source.java:jboss/datasources/DefaultDS]
我在modules / com / oracle /下有一个模块ojdbc / main:
I have a module under modules/com/oracle/ojdbc/main:
<module xmlns="urn:jboss:module:1.0" name="com.Oracle.ojdbc">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
当然,罐子也在那里。
有人可以告诉我我在做什么错吗?
Can someone please tell me what am I doing wrong here?
答
得到答案:
在驱动程序部分,我将驱动程序定义为坐在模块 com.oracle.ojdbc
中,但该模块本身实际上是用大写字母定义的 O 种族中的'O',因此应为 com.Oracle.ojdbc
In the drivers section, I defined the driver as sitting in module "com.oracle.ojdbc"
but the module itself is actually defined with capital 'O' in 'Oracle' so it should be "com.Oracle.ojdbc"