Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sasikanth Padigala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How have you configured the datasources?
 
Sasikanth Padigala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I did it through properties file (while the time of container build)
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic