4 Replies Latest reply: Dec 17, 2008 7:07 AM by Juan Ignacio Sánchez Lara RSS

"Apparently wrong driver class specified for URL: class: ora

Juan Ignacio Sánchez Lara Apprentice

Hello,

I'm deploying a Seam application with Eclipse at JBoss Server 4.2.3. My database is Oracle 10g XE. I've added to the project classpath the ojdbc14.jar I've found at its installation.

This is my datasource configuration:

<datasources>
 <local-tx-datasource>
 <jndi-name>reincideDatasource</jndi-name>
 <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
 <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
 <user-name>***</user-name>
 <password>***</password>
 </local-tx-datasource>
</datasources>


When the server starts it logs this ugly trace:


10:42:59,000 INFO [DatasourceConnectionProvider] Using datasource: java:/reincideDatasource
10:42:59,000 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE)
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:190)
 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619)
 at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264)
 at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
...
Caused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:301)
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
 ... 166 more
10:42:59,031 WARN [SettingsFactory] Could not obtain connection metadata
org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE))
 at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
 at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
...
 at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE)
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:190)
...
 ... 158 more
Caused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@localhost:1521:XE
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:301)
 at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
 ... 166 more


Nevertheless, application works. For example:

10:42:59,281 INFO [SchemaUpdate] Running hbm2ddl schema update
10:42:59,281 INFO [SchemaUpdate] fetching database metadata
10:42:59,765 INFO [SchemaUpdate] updating schema
10:42:59,859 INFO [TableMetadata] table found: REINCIDE.TIPOINCIDENCIA
10:42:59,859 INFO [TableMetadata] columns: [name, id, version]
10:42:59,859 INFO [TableMetadata] foreign keys: []
10:42:59,859 INFO [TableMetadata] indexes: [sys_c003997]
10:42:59,859 INFO [SchemaUpdate] schema update complete


What might be wrong?