PKG
PKG

Reputation: 301

Getting error on JBOSS start up Unable to instantiate driver class "oracle.jdbc.OracleDriver"

I am new to JBOSS server. For my application i am trying to create oracle JDBC connection in JBOSS.

I did the following things- 1) Created the folder oracle->main inside JBOSS_HOME/modules/com and placed ojdbc6.jar inside main folder. 2) created the module.xml file.

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

3) Created the ojdbc6.jar.index file. 4) In standalone.xml, register the driver as below-

<driver name="oracle" module="com.oracle">
<driver-class>
oracle.jdbc.OracleDriver
</driver-class>
</driver>

but while starting the JBOSS server it is showing an error as

11:31:09,847 WARN  [org.jboss.as.connector.subsystems.datasources] 
(ServerService   Thread Pool -- 26) JBAS010402: Unable to instantiate 
driver class "oracle.jdbc.OracleDriver": java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver from [Module "com.oracle:main" from local module loader @187814 (roots: C:\jboss-as-7.1.0.CR1b\modules)]
11:31:09,890 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 26) Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "oracle")
]) - failure description: "JBAS010434: Unable to instantiate driver class \"oracle.jdbc.OracleDriver\". See log (WARN) for more details"

I dont have the oracle on my local PC, it is on other machine.

Please help me.

Thanks in advance.

Upvotes: 1

Views: 5080

Answers (1)

Pirabu Govindaraj
Pirabu Govindaraj

Reputation: 176

Try this link,Here its used for postgresql to create the datasource JBoss AS 7 - Datasource configuration for postgresql

instead of postgres driver use oracle driver.

Upvotes: 1

Related Questions