I'm currently migrating from jboss 4.3 to jboss 7.1.1 (Final) and i'm trying to configure an oracle datasource but it's not working. Following is what I've done to setup an oracle datasource
1)Downloaded ojdbc6-11.jar and placed it inside the folder $JBOSS_HOME/modules/com/oracle/ojdbc6/main
2)Created the file module.xml under $JBOSS_HOME/modules/com/oracle/ojdbc6/main and this is the content of the file
3)Added the following driver and datasource inside standalone.xml
oracle.jdbc.OracleDriver
connurl
oracle
username
passwd
However, when I deploy my war file, i get the following error
16:54:43,281 INFO [org.jboss.as.server] (HttpManagementService-threads - 2) JBA
S015870: Deploy of deployment "altisavante.war" was rolled back with failure mes
sage {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.na
ming.context.java.module.altisavante.altisavante.env.Altisjboss.naming.context.j
ava.AltisMissing[jboss.naming.context.java.module.altisavante.altisavante.env.Al
tisjboss.naming.context.java.Altis]"]}
Am I missing anything?
解决方案
Here's a link about the data source configuration for JBoss 7 that of course work with 7.1
The example is configuring a MySQL example.
This is what i did for an Oracle Driver
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1524))(CONNECT_DATA=(SERVICE_NAME=profepa)(SERVER=DEDICATED)))
com.oracle
3
5
user
pass
5000
5
The driver's section would look like this:
oracle.jdbc.driver.OracleDriver
My module.xml is under $JBOSS_HOME\modules\com\oracle\main within the jar ojdbc6.jar: