JDBC DataSource or XADataSource cannot be cast to java.sql.Driver in JBoss EAP

Solution Verified - Updated -

Issue

  • Encountering an error using DB2SimpleDataSource

    ... IJ000610: Unable to fill pool: javax.resource.ResourceException: Could not create connection
            ...
    Caused by: javax.resource.ResourceException: Failed to register driver for: com.ibm.db2.jcc.DB2SimpleDataSource
            ...
    Caused by: java.lang.ClassCastException: com.ibm.db2.jcc.DB2SimpleDataSource cannot be cast to java.sql.Driver
            ...
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content