Skip to Content

Summary

If you have updated an external Microsoft SQL Server(MSSQL) and SAP PI/PO JDBC connection is not working. Apply SAP Note 2356977 on the MSSQL server.

Detailed Explanation

Recently we had an SQL server upgrade in one of our customers. SQL server is a 3rd party system communicating with SAP PI/PO using JDBC.

We got errors pinging the channel, where the old adapter and the old server worked perfectly fine with similar settings. We have tried nearly every combination of JDBC connection URL using the hostname, IP, server name, instance name or port.

Then we deployed XPI Inspector to see the underlying error. The problem is SSL related.

[EXCEPTION]
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "java.lang.ArrayIndexOutOfBoundsException: 64".
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1533)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1042)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at com.sap.aii.adapter.jdbc.sql.DriverManager.getConnection(DriverManager.java:204)
at com.sap.aii.adapter.jdbc.JDBCConnectionPool.createNewResource(JDBCConnectionPool.java:66)
at com.sap.aii.af.lib.util.concurrent.AbstractResourcePool.getResource(AbstractResourcePool.java:151)
at com.sap.aii.adapter.jdbc.XI2JDBC.getDBConnection(XI2JDBC.java:1211)

Apparently, SQL Server uses encryption for the login even if you want to send data unencrypted.

Newer versions of Microsoft SQL Server(MSSQL) uses new ciphers and they cause problems with older JDBC drivers. Explained here.

If your NetWeaver Java system runs on JRE 8 you can use JDBC 4.2 API. But if you are using Java 6 or 7. You have to apply the note to disable new ciphers.

Thanks for reading,
Fatih

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply