Solutions
Archived

Data too long for column 'subjectrev' at row 1 error when using the Google Apps connector in OpenIDM 3.1.0

Last updated Jan 5, 2021

The purpose of this article is to provide assistance if you receive a "Data truncation: Data too long for column 'subjectrev' at row 1" error when provisioning user accounts using the Google Apps™ connector in OpenIDM 3.1.0. This error could affect you if you are using an external JDBC repository, such as a MySQL™ repository.


Archived

This article has been archived and is no longer maintained by ForgeRock.

Symptoms

The following error is shown in the OpenIDM log when creating a user via curl:

Jun 12, 2015 2:01:20 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 filterGenericError WARNING: Resource exception: 500 Internal Server Error: "Creating object failed (1406-22001)Data truncation: Data too long for column 'subjectrev' at row 1" org.forgerock.json.resource.InternalServerErrorException: Creating object failed (1406-22001)Data truncation: Data too long for column 'subjectrev' at row 1 at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.create(JDBCRepoService.java:281) at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleCreate(JDBCRepoService.java:218) at org.forgerock.json.resource.Router.handleCreate(Router.java:222) at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:67) ... Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'subjectrev' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3833) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ...

Recent Changes

Upgraded to OpenIDM 3.1.0.

Configured the Google Apps connector for provisioning user accounts.

Causes

When provisioning user accounts using the Google Apps connector, the object creation is logged in the audit activity log and the ETag of the newly created object is stored in the subjectrev field. The ETag value returned by the Google APIs is 57 characters in length, whereas the default length of this field defined in the schema is 38. Since the value returned by the Google APIs is longer than permitted, OpenIDM fails to write the audit entry.

Solution

This issue can be resolved by upgrading to OpenIDM 4 or later; you can download this from BackStage.

Alternatively, you can increase the size of the subjectrev field within the auditactivity table to VARCHAR(255).

See Also

N/A

Related Training

N/A

Related Issue Tracker IDs

OPENIDM-3324 (Data too long for column 'subjectrev' when provisioning to GoogleApps w/MySQL Repository)


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.