"java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter" connecting to Microsoft SQL Server in JBoss EAP

Solution Verified - Updated -


  • Using Microsoft SQL Server JDBC 4.1 (or later) driver deployed in a JBoss module:

    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.0" name="com.microsoft.sqlserver">
                <resource-root path="sqljdbc41.jar"/>
                <module name="javax.api"/>
                <module name="javax.transaction.api"/>
  • Login fails with a NoClassDefFoundError:

    ... java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2758)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2244)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
        at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:323)
        ... 41 more
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter from [Module "com.microsoft.sqlserver:main" from local module loader ...
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:211)


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
    • 6
  • Microsoft SQL Server JDBC driver 4.1 or later

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

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