"Apparently wrong driver class specified for URL" error during startup in JBoss EAP

Solution Verified - Updated -

Issue

During server start-up this WARN is logged:

    WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main) 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: com.microsoft.sqlserver.jdbc.SQLServerDriver, url: jdbc:microsoft:sqlserver://SERVERNAME:1433;DatabaseName=DBNAME)
         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:633)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:716)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
         at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
         ...
    Caused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: com.microsoft.sqlserver.jdbc.SQLServerDriver, url: jdbc:microsoft:sqlserver://hostname.example.com:1433;DatabaseName=MYDB
         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:492)
         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)
         ... 80 more
  • We are migrating Java application from WAS 6.1 to JBoss EAP 6.3 . When we configure SQL server data source, we got wrong driver class error. In WAS, we are using driver class: com.ibm.websphere.jdbcx.sqlserver.SQLServerDataSource.
Caused by: javax.resource.ResourceException: Wrong driver class [class com.microsoft.sqlserver.jdbc.SQLServerDriver] for this connection URL [jdbc:microsoft:sqlserver://hostname:portvalue;DatabaseName=xyz]

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.3
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.