How to create and install a module which contain multiple JDBC drivers in EAP6

Solution Unverified - Updated -

Issue

  • I need to have multiple JDBC drivers in one module, how can I achieve this?
  • Driver can not be installed with an error
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 25) JBAS014612: Operation ("add") failed - address: ([("subsystem" => "datasources"), ("jdbc-driver" => "com.drivers.driver")
]): org.jboss.msc.service.DuplicateServiceException: Service jboss.jdbc-driver.com_drivers_driver is already registered
  • Datasource can not be used, the creation fail with
javax.resource.ResourceException: Wrong driver class [class org.hsqldb.jdbc.JDBCDriver] for this connection URL [jdbc:oracle:thin:@localhost:1521:ora12]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.2.x, 6.3.x

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