webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

webMethods Integration server

  • 1.  webMethods Integration server

    Posted Thu August 08, 2024 03:04 AM

    Product/components used and version/fix level:

    webMethods Integration Server: 10.15.0.0
    MSSQL Server: 16.0.1
    Java: 8
    Microsoft JDBC Driver: mssql-jdbc-12.8.0.jre8

    Detailed explanation of the problem:

    I tried to create a new connection to MSSQL server, for “DataSource Class” i entered “com.microsoft.sqlserver.jdbc.SQLServerDriver”, when click on “Test connection” i got the below error

    Error messages / full error message screenshot / log file:

    Error encountered

    [ART.118.5011] Adapter Runtime (Connection): Unable to create new connection connection:sqlServerConn. [ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDriver”. class com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be cast to class javax.sql.DataSource (com.microsoft.sqlserver.jdbc.SQLServerDriver is in unnamed module of loader com.wm.app.b2b.server.PackageClassLoader @12792b88; javax.sql.DataSource is in module java.sql of loader ‘platform’)

    Question related to a free trial, or to a production (customer) instance?

    Free trial


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: webMethods Integration server

    Posted Thu August 08, 2024 07:19 AM

    Hi Mazen,

    the mentioned class does not implement the DataSource interface and therefore cannot be used with the JDBC Adapter. There should be a corresponding DataSource implementation in the driver jar.
    Change your connection config to this DataSource class and test again.
    After that you should be able to use your connection.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: webMethods Integration server

    Posted Tue August 27, 2024 06:02 AM

    Hi Holger,
    Thanks for your reply,
    I changed the “DataSource Class” to “com.microsoft.sqlserver.jdbc.SQLServerDataSource”, and the connection worked successfully


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: webMethods Integration server

    Posted Thu August 08, 2024 11:46 AM

    You can find the most up to date JDBC drivers from microsoft website below.


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: webMethods Integration server

    Posted Thu August 08, 2024 01:15 PM

    Hi Engin,

    you are right, but this does not seem to be issue here as the driver version 12.8 ist the latest and recommended one. Even the java version is out of scope here as the jre8 jar is the correct one for Java 8.

    More likely it relates to wrong usage of the Driver class instead of the DataSource class, what I have already mentioned in my previous post.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: webMethods Integration server

    Posted Thu August 08, 2024 01:28 PM

    According to this information, it should be java 11 not java 8. To me it looks like it is a JDBC driver issue.


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: webMethods Integration server

    Posted Thu August 08, 2024 01:56 PM

    Even with Java 11, the jre8 jar should be working while using the jre11 jar might be the better option.

    But as already mentioned, this only applies when choosing the correct class for the right Adapter technology:

    • Driver class for WmDB package
    • DataSource class for WmJDBCAdapter package.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: webMethods Integration server

    Posted Fri August 09, 2024 03:41 AM

    As @Holger_von_Thomsen wrote, this is indeed about the wrong Java class.

    The error message indicates this very clearly:

    class com.microsoft.sqlserver.jdbc.SQLServerDriver cannot be cast to class javax.sql.DataSource


    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: webMethods Integration server

    Posted Tue August 27, 2024 06:04 AM

    The issue was in the “DataSource Class” the java 8 is working fine


    #webMethods
    #Integration-Server-and-ESB