SAP Knowledge Base Article - Preview

2887731 - SSL connection in JDBC channels are failing with error java.lang.ArrayIndexOutOfBoundsException

Symptom

Your are using a JDBC sender or receiver channel in your Process Integration or Process Orchestration systems. The channel connects to a SQL server using Secure Sockets Layer (SSL) encryption. The message processing fails with the following errors:

com.sap.aii.af.lib.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection with the registered driver. com.microsoft.sqlserver.jdbc.SQLServerDriver returns: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "java.lang.ArrayIndexOutOfBoundsException: while trying to load from index 64 of a byte (or boolean) array with length 64, loaded from a local variable at slot 8"

You collect a XPI Inspector trace with Example 50 - Channel for the specific JDBC channel and you notice a similar following stacktrace for the failed message:

[EXCEPTION]
com.microsoft.sqlserver.jdbc.SQLServerDriver returns: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "java.lang.ArrayIndexOutOfBoundsException: while trying to load from index 64 of a byte (or boolean) array with length 64, loaded from a local variable at slot 8" . ClientConnectionId:<specific connectionID>
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1668)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
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.processMessage(XI2JDBC.java:382)
at com.sap.aii.adapter.jdbc.XI2JDBC.dispatchMessage(XI2JDBC.java:258)
...
Caused by: javax.net.ssl.SSLException: java.lang.ArrayIndexOutOfBoundsException: 64
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1574)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1557)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1146)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618)
... 117 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 64
at com.sun.crypto.provider.TlsPrfGenerator.expand(DashoA13*..)
at com.sun.crypto.provider.TlsPrfGenerator.doPRF(DashoA13*..)
at com.sun.crypto.provider.TlsPrfGenerator.doPRF(DashoA13*..)
at com.sun.crypto.provider.TlsMasterSecretGenerator.engineGenerateKey(DashoA13*..)
at javax.crypto.KeyGenerator.generateKey(DashoA13*..)
at com.sun.net.ssl.internal.ssl.Handshaker.calculateMasterSecret(Handshaker.java:676)
at com.sun.net.ssl.internal.ssl.Handshaker.calculateKeys(Handshaker.java:639)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:760)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:226)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139)
... 119 more


Read more...

Environment

  • SAP NetWeaver 7.3
  • SAP enhancement package 1 for SAP NetWeaver 7.3
  • SAP NetWeaver 7.4

Product

SAP NetWeaver 7.3 ; SAP NetWeaver 7.4 ; SAP enhancement package 1 for SAP NetWeaver 7.3

Keywords

Process Integration 7.30, PI 7.30, Process Integration 7.31, PI 7.31, Process Orchestration 7.4, PI 7.4, PO 7.4, com.microsoft.sqlserver.jdbc.SQLServerException,  The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption, Der Treiber konnte keine sichere Verbindung mit SQL Server über die SSL (Secure Sockets Layer)-Verschlüsselung herstellen, java.lang.ArrayIndexOutOfBoundsException, java.lang.ArrayIndexOutOfBoundsException: while trying to load from index 64 of a byte (or boolean) array with length 64, loaded from a local variable at slot 8, com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate, , KBA , BC-XI-CON-JDB , JDBC Adapter , BC-JVM , SAP Java Virtual Machine , BC-DB-MSS , SQL Server in SAP NetWeaver Products , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.