Error concerning LDAPUserImporterImpl when importing data from LDAP onto Liferay
Neil Cuzon
更新
Issue
We encountered the following error when attempting to import user data from LDAP onto Liferay:
ERROR [liferay/scheduled_user_ldap_import-1][LDAPUserImporterImpl:817] Unable to import user CN=firstName lastName,OU=STU,OU=UserAccounts,OU=Tier2,OU=COMPANY: null:null:{samaccountname=sAMAccountName: firstName.lastName}
org.springframework.dao.DataIntegrityViolationException: could not update: [com.liferay.portal.model.impl.UserImpl#8695514]; SQL [update User_ set mvccVersion=?, modifiedDate=?, jobTitle=? where userId=? and mvccVersion=?]; nested exception is org.hibernate.exception.DataException: could not update: [com.liferay.portal.model.impl.UserImpl#8695514]
Environment
DXP 7.0
Resolution
The error above is caused by the character count for the 'jobTitle' value exceeding 100 characters. The max number of characters allowed for the JobTitle column is set to 100 characters, by default. The issue is resolved by reducing the characters contained in the Job title to 100 characters.
Thirdly, we would like to stress that increasing the SQL Column limit is inadvisable to resolve this type of issue, as it might cause upgrade issues further down the line.