Unable to create the Organization with Activate Directory integration

Document ID : KB000007329
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

We are trying to integrate Active directory with strong auth server, We are getting below error messgae on the browser when I have tried to Map the attributes.

webfort.jpeg

 

We could see that below error is coming in arcotadmin logs while trying to insert the data into ARUDSLDAPREPOSITORYCONFIG tables. 

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : java.sql.Connection : {conn-103822} Preparing Statement:    INSERT INTO ARUDSLDAPREPOSITORYCONFIG     (ORGNAME, HOST, PORT, SCHEMANAME, USERNAME, PASSWORD, BASEDN,      SSLTYPE, ROOTCERT, KEYSTORE, KEYSTOREPASSWORD, REDIRECTATTRIBUTE, REDIRECTSCHEMA)   VALUES     (?,?,?,?,?,?,?,      ?, ?,?,?, ?, ?)  

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : java.sql.PreparedStatement : {pstm-103830} Executing Statement:    INSERT INTO ARUDSLDAPREPOSITORYCONFIG     (ORGNAME, HOST, PORT, SCHEMANAME, USERNAME, PASSWORD, BASEDN,      SSLTYPE, ROOTCERT, KEYSTORE, KEYSTOREPASSWORD, REDIRECTATTRIBUTE, REDIRECTSCHEMA)   VALUES     (?,?,?,?,?,?,?,      ?, ?,?,?, ?, ?)  

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : java.sql.PreparedStatement : {pstm-103830} Parameters: [ACTIVEDIRECTORYTEST, xyzabcd.tcat.local, 389, inetorgperson, CN=Prasanna Kumar Reddy,OU=Information Technology,OU=Business Support,OU=TCA Abu Dhabi,OU=Users,OU=S01-NationTowers,DC=TCAT,DC=LOCAL, O0otHjyAb5/x2S6icLF51g==, DC=TCAT,DC=LOCAL, null, null, null, null, null, ]

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : java.sql.PreparedStatement : {pstm-103830} Types: [java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, null, null, null, null, null, java.lang.String]

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.ArcotPreparedStatementHandler : Exception occured while delegating to the method, execute

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOUtil : Database exception occured, Error message: String or binary data would be truncated., ErrorCode:8152, ErrorState:22001

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOUtil : com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOManagerImpl : Determining if SQL exception with Error Code '8152' Error state '22001' requires Database Failover.

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOManagerImpl : Neither error code nor error state matched known error codes / error states.

2017-06-19 16:22:11,909 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOManagerImpl : Using the present connection to ping the datasource

2017-06-19 16:22:11,924 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOManagerImpl : Ping query succeeded.

2017-06-19 16:22:11,924 GST : [http-nio-8080-exec-9] : DEBUG : common.database.DBFOUtil : Database fail over is not required for this SQL Exception; Throwing back the exception back to the caller.

2017-06-19 16:22:11,924 GST : [http-nio-8080-exec-9] : ERROR : ldap.db.LDAPOrganizationService : [Arcot Admin Console] : [dbcb7314-05a2-461e-976c-e539b4b29247] : [31201] : Unable to process the database query, createOrganization.

Environment:
Strong Auth server 8.1
Cause:

Below error indicates that the length of one or more fields is NOT big enough to hold the data you are trying to insert, hence it is throwing below error. 

com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated. 

For example, if the USERNAME field is a varchar(8) field, and you try to put 11 characters in to it, you will get this error.  

Here the USERNAME was too big, hence insert operation was failing since the length of the field is less than the data size.

 

Resolution:

1. Kindly verify the column size for all the fields on the below tables and increase the length accordingly. (In this use case USERNAME was too big which caused the issue)

ARUDSLDAPREPOSITORYCONFIG

2. Kindly reduce the length of the data which you are trying to insert in to the database.