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

Sqlserver jdbc connection failed

  • 1.  Sqlserver jdbc connection failed

    Posted Mon December 04, 2023 08:23 PM

    Product/components used and version/fix level:

    webMethods Integration 10.15 Free Trial

    Detailed explanation of the problem:

    An error has occurred during the database connection. How can I resolve this? Please help.

    Error messages / full error message screenshot / log file:

    [ART.118.5011] Adapter Runtime (Connection): Unable to create a new connection for SNDAdapter:msSQL_Notrn.
    [ADA.1.204] Unable to establish a connection to the database using the DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
    The “encrypt” property is set to “true” and the “trustServerCertificate” property is set to “false,” but the driver cannot establish a secure connection to the SQL Server using SSL (Secure Sockets Layer) encryption. Error: The server-selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12, TLS11].

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


    #webMethods-io-Integration
    #webMethods
    #webMethods-cloud


  • 2.  RE: Sqlserver jdbc connection failed

    Posted Tue December 05, 2023 07:11 AM

    Hi,

    please provide JDBC Adapter version and SQL Server driver version.

    TLS10 (TLS v1.0) is considered deprecated, same applies to TLS11 (TLS v1.1).
    Can you provide some more details about your JDBC Connection config, esp. the “Other Properties” field?

    You might want to cross check this with your SQL Server DBA.

    Regards,
    Holger


    #webMethods-io-Integration
    #webMethods-cloud
    #webMethods


  • 3.  RE: Sqlserver jdbc connection failed

    Posted Tue December 05, 2023 07:27 PM

    I’m using openJDK 19, so I’ve used mssql-jdbc-12.4.2.jre11. How can I check the version of the JDBC adapter?

    Thank you.


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 4.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 03:10 AM

    Hello @biberdw

    In the connection configuration, put serviceName=qwe;driverType=thin in the Other Properties field. In the Sever Name field, it is better to use the IP address like 127.0.0.1.

    I presume you have already downloaded the driver and put it to the folder SoftwareAG\IntegrationServer\instances\default\packages\WmJDBCAdapter\code\jars if you are using the default instance.

    Best regards !


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 5.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 03:28 AM

    Hello. @codrelphi
    I have actually attempted to connect using an external IP address. I’ve entered serviceName and driverType in the Other Properties, but the issue persists, and the same error message occurs.
    Thank you


    #webMethods
    #webMethods-cloud
    #webMethods-io-Integration


  • 6.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 05:32 AM

    @biberdw Add the parameters encrypt=true;trustServerCertificate=true in the Other Properties field. So you will have this: serviceName=qwe;driverType=thin;encrypt=true;trustServerCertificate=true

    After the modification of the Other Properties field, if the issue still remained, go to your database management tools and test if you really have access to your database (qwe) using the credentials you provide above (User, Password). And provide us a screenshot of the content of this folder SoftwareAG\IntegrationServer\instances\default\packages\WmJDBCAdapter\code\jars and a screenshot of your actual connection configuration (like what you provide above).


    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud


  • 7.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 06:57 AM

    Hi,

    I am not sure if the option “driverType=thin” applies to MS SQL Server driver.
    I only used it to tell the oracle driver to use JDBC Type 4 thin mode instead of JDBC Type 2 oci mode, which would require an additional native lib.

    In addition to Chancerel, you might need to add an option for specifying the exact TLS version (>= v1.2).

    Regards,
    Holger


    #webMethods-io-Integration
    #webMethods-cloud
    #webMethods


  • 8.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 10:01 AM

    @Holger_von_Thomsen You are right about the option “driverType=thin”.
    @biberdw Please skip the option “driverType=thin” in the Other Properties field. Also make sure to restart your Integration Server if you didn’t do it after installing the driver jars.


    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud


  • 9.  RE: Sqlserver jdbc connection failed

    Posted Wed December 06, 2023 07:13 PM


    @codrelphi
    Yes, I was able to access the database using my management tool. There are no issues with the credentials (username, password). I have also included the encrypt option and trustServerCertificate in otherProperties, but the same error message as before persists. Thank you.

    @Holger_von_Thomsen
    How can I add options to specify the TLS version (>= v1.2) when connecting?


    #webMethods-cloud
    #webMethods-io-Integration
    #webMethods


  • 10.  RE: Sqlserver jdbc connection failed

    Posted Thu December 07, 2023 03:44 AM

    @biberdw In your database management tool, look for Driver properties and check the values of the following properties:
    javax.net.ssl.keyStore
    javax.net.ssl.keyStorePassword
    javax.net.ssl.keyStoreType
    javax.net.ssl.trustStore
    javax.net.ssl.trustStorePassword
    javax.net.ssl.trustStoreType

    Give us the values. A screenshot of all the Driver properties can be nice too


    #webMethods
    #webMethods-cloud
    #webMethods-io-Integration


  • 11.  RE: Sqlserver jdbc connection failed

    Posted Thu December 07, 2023 04:28 AM

    @biberdw Please, do the following actions:
    1- go to your Integration Server Admin Panel (by default it is on ipAdress:5555)
    2- on the left sidebar, click on Extended button inside the Settings tab.
    3- now, look for the following options:
    - watt.net.jsse.client.enabledProtocols
    - watt.net.jsse.server.enabledProtocols
    - watt.net.jsse.client.disabledProtocols
    - watt.net.jsse.server.disabledProtocols

    Please give us the values of these properties. It is possible in your case to not find two of the above properties. Give us what you find.


    #webMethods-io-Integration
    #webMethods-cloud
    #webMethods


  • 12.  RE: Sqlserver jdbc connection failed

    Posted Thu December 07, 2023 06:59 PM

    @codrelphi
    Yes, I found two options:

    • watt.net.jsse.client.disabledProtocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1
    • watt.net.jsse.server.disabledProtocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1

    However, I couldn’t find the following two options:

    • watt.net.jsse.client.enabledProtocols
    • watt.net.jsse.server.enabledProtocols

    Thank you.


    #webMethods-cloud
    #webMethods-io-Integration
    #webMethods


  • 13.  RE: Sqlserver jdbc connection failed

    Posted Fri December 08, 2023 03:19 AM

    @biberdw
    The options watt.net.jsse.client.disabledProtocols and watt.net.jsse.server.disabledProtocols contain the correct values.

    In short you are using webMethods 10.15, JDBC Adapter 12.4.2. What is the version of your MS SQL Server ?
    At this point I think there is a mismatch between the version of the adapter and the version of the database server. Let us know its version.

    PS: if the version is really old and you can get an actual version of the database, get it. Keep the previous Other Properties options in the previous posts ( serviceName=qwe;encrypt=true;trustServerCertificate=true). Test the connection to your database with your database management tool. Restart the IS and the issue should go.


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 14.  RE: Sqlserver jdbc connection failed

    Posted Fri December 08, 2023 09:58 AM

    Hi,

    JDBC Adapter for webMethods ART on IntegrationServer should have a version 10.3 with Fixes.
    12.4.2 is just the version of the MS SQL Server JDBC driver.

    Regards,
    Holger


    #webMethods
    #webMethods-cloud
    #webMethods-io-Integration


  • 15.  RE: Sqlserver jdbc connection failed

    Posted Mon December 11, 2023 01:33 AM

    @codrelphi
    Hello.
    The version of MSsql I am using is Microsoft SQL Server 2014 - 12.0.2000.8, and I have tried changing the JDBC drivers to the following versions, but I am still experiencing the same error:

    • mssql-jdbc-7.4.1.jre8
    • mssql-jdbc-9.2.0.jre8
    • mssql-jdbc-9.2.1.jre8
    • mssql-jdbc-12.2.0.jre8
    • mssql-jdbc-12.2.0.jre11
    • mssql-jdbc-12.4.0.jre8
    • mssql-jdbc-12.4.0.jre11
    • mssql-jdbc-12.4.2.jre8
    • mssql-jdbc-12.4.2.jre11

    Thank you


    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud


  • 16.  RE: Sqlserver jdbc connection failed

    Posted Mon December 11, 2023 03:20 AM

    @biberdw I guess you are doing some testing on your local environment. So, if possible upgrade your MS SQLServer to a recent version like 2019 or 2022. You can still using wM10.15 and the jdbc driver 12.4.2.


    #webMethods-io-Integration
    #webMethods
    #webMethods-cloud


  • 17.  RE: Sqlserver jdbc connection failed

    Posted Wed December 13, 2023 11:23 PM

    @codrelphi
    I have resolved the issue by switching the database to Oracle.
    Thank you.


    #webMethods
    #webMethods-cloud
    #webMethods-io-Integration


  • 18.  RE: Sqlserver jdbc connection failed

    Posted Thu December 07, 2023 07:14 AM

    Hi,

    as we did not work with ms sql server databases lately I am not aware of this.
    We have worked with Oracle databases most of the time.

    Regards,
    Holger


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration


  • 19.  RE: Sqlserver jdbc connection failed

    Posted Thu December 07, 2023 06:58 PM

    Yes, I found two options:

    • watt.net.jsse.client.disabledProtocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1
    • watt.net.jsse.server.disabledProtocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1

    However, I couldn’t find the following two options:

    • watt.net.jsse.client.enabledProtocols
    • watt.net.jsse.server.enabledProtocols

    Thank you.


    #webMethods
    #webMethods-io-Integration
    #webMethods-cloud