AS 7.1 and oracle 10g : “wrong driver class” using ojdbc14.jar
jsebfranck Dec 14, 2011 3:11 PMI'm trying to configure a data-source on jboss 7.1 with oracle 10g but I have the following errors :
16:23:24,155 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (MSC service thread 1-4) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
...
Caused by: javax.resource.ResourceException: Wrong driver class [class oracle.jdbc.driver.OracleDriver] for this connection URL [jdbc:inetora:...:...:...?timestampToDate=true&streamstolob=true]
My configuration in standalone.xml is :
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:/OracleDS" pool-name="OracleDS" use-java-context="true">
<connection-url><![CDATA[jdbc:inetora:...:...:...?timestampToDate=true&streamstolob=true]]></connection-url>
<driver>oracle</driver>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
</pool>
<security>
<user-name>user_name</user-name>
<password>password</password>
</security>
<timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
</timeout>
<validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter>
</validation>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle.ojdbc14">
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
</driver>
</drivers>
</datasources>
</subsystem>
My persistence.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="defaultEntityManager" transaction-type="JTA">
<jta-data-source>java:/OracleDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
</properties>
</persistence-unit>
</persistence>
In JBoss modules/, I added a com/oracle/ojdbc14/main directory containing ojdbc14.jar and a module.xml file :
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc14">
<resources>
<resource-root path="ojdbc14.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
Any idea of how I could resolve this problem?
Thank you in advance!