SQLServerException: This driver is not configured for integrated authentication

Description

Recently I’ve been developing a new interface between ECC -> SAP PI -> SQLServer and I’ve came across following error:

JDBC message processing failed; reason Error when attempting to get processing resources: 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: This driver is not configured for integrated authentication.: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

SQLServerException: This driver is not configured for integrated authentication
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. (click on the picture to enlarge)

Explanation

Since JDBC 4.0 driver you’re allowed to use a new parameter in your connection string which is authenticationScheme. This parameter indicates connection method used to connect to to SQL Server. There are 2 possible values:

  • NativeAuthentication (default) – Specific to Windows platform. Uses the sqljdbc_auth.dll file.
  • JavaKerberos – Windows platform independent. Applicable for both Windows and Linux running servers

Solution

In my case fixing this error turned out to be quite easy. It was just limited to reviewing JDBC connection string. Turned out that simply removing authenticationScheme parameter made my interface work. This is how the working Receiver CC configuration looks like:

JDBC receiver configuration
JDBC receiver communication channel configuration – Connection tab (click on the picture to enlarge)

Communication channel parameters

JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection: jdbc:sqlserver://<host>:<port>;databaseName=<dbname>
User name: <username>
Password: <password>

Now that you have changed your receiver Communication Channel configuration as described in this guide, you are ready to test your interface again. The error we have investigated in this guide (com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.) should not appear anymore. Voila!

Optional step

As and optional step you can switch to Advanced tab, check Advanced Mode field and provide and add parameters as marked on below screenshot. This option will allow you to preview generated SQL statement for verification, that will be executed by receiver DB.

log SQL statement
JDBC receiver communication channel configuration – advanced tab (click on the picture to enlarge)

Name: logSQLStatement
Value: true

Related content

Note 2063879 – Driver is not configured for integrated authentication error in PI JDBC Adapter

msdn.microsoft.com – JDBC: This driver is not configured for integrated authentication

 

About maciejbialek

Hello! I'm passionate, certified ABAP developer and SAP Consultant with many years of hands-on experience gained across several projects in Telco and Energy & Utilities industries. I've worked as Integration Architect, PI and ABAP Developer as well as BPC (NW) Consultant for local and international clients.

Leave a Reply