File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Failed to register driver for: oracle.jdbc.pool.OracleDataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Failed to register driver for: oracle.jdbc.pool.OracleDataSource" Watch "Failed to register driver for: oracle.jdbc.pool.OracleDataSource" New topic
Author

Failed to register driver for: oracle.jdbc.pool.OracleDataSource

Sasikanth Padigala
Greenhorn

Joined: Aug 03, 2012
Posts: 2

Hi I am new to JBOSS and trying to build the Jboss container and further app deployment. I have configured 4 data sources and finally when I restart the server, The logs shows the below errors. I could not figure out the issue here. Please help. I am using java 6

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: Failed to register driver for: oracle.jdbc.pool.OracleDataSource; - nested throwable: (java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource cannot be cast to java.sql.Driver))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:639)


Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: oracle.jdbc.pool.OracleDataSource; - nested throwable: (java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource cannot be cast to java.sql.Driver)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:489)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)
... 98 more
Caused by: java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource cannot be cast to java.sql.Driver
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:481)
... 99 more
07:10:08,368 INFO [STDOUT] [2012-08-02 07:10:08,365] - [main] - DEBUG - org.hibernate.util.JDBCExceptionReporter - SQL Exception
org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/CMSDBDataSource; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/CMSDBDataSource)


Sumit Patil
Ranch Hand

Joined: May 25, 2009
Posts: 296

How have you configured the datasources?

Thanks & Regards, Sumeet
SCJP 1.4, SCWCD 5, LinkedIn Profile
Sasikanth Padigala
Greenhorn

Joined: Aug 03, 2012
Posts: 2

I did it through properties file (while the time of container build)
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9318
    
109

Please post the relevant -ds.xml file.

P.S: While posting logs, code or xml content wrap them in code blocks. You can use the Code button in the message editor window to do that and use the Preview button to make sure it's correctly formatted.

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Failed to register driver for: oracle.jdbc.pool.OracleDataSource
 
Similar Threads
Need help to setup datasource for AS/400
Jboss & SQL server 2008
Error in DB2 connection Pooling
JBOSS and Mysql
Problem oin connecting Oracle database in JBOSS AS 4.2.3