Uploaded image for project: 'eXo-JCR'
  1. eXo-JCR
  2. EXOJCR-794

Field "CONFIG" in the table "JCR_CONFIG" is too short on MySql

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: JCR-1.12.2-GA
    • Fix Version/s: JCR-1.14.0-Beta01
    • Component/s: jcr.component.core
    • Labels:
    • Environment:

      GateIn 3.0.0-GA
      eXoSocial 1.0.0-GA
      JCR-1.12-SEC
      MySQL server 5.1.28-rc-community
      MySQL driver 5.1.47

      Description

      After the creation of the fourth repository (4 workspaces) which based on MySql database we have received this exceptions:

      SEVERE: The restore was fail
      org.exoplatform.services.jcr.ext.backup.RepositoryRestoreExeption: Can not restore workspace "portal-system in repository "tenant5".
      at org.exoplatform.services.jcr.ext.backup.impl.JobRepositoryRestore.restore(JobRepositoryRestore.java:210)
      at org.exoplatform.services.jcr.ext.backup.impl.JobRepositoryRestore.run(JobRepositoryRestore.java:276)
      Caused by: javax.jcr.RepositoryException: Database exception. com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'CONFIG' at row 1. SQL: UPDATE JCR_CONFIG SET CONFIG=? WHERE NAME=?: Database exception. com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'CONFIG' at row 1. SQL: UPDATE JCR_CONFIG SET CONFIG=? WHERE NAME=?
      at org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl.retain(RepositoryServiceConfigurationImpl.java:207)
      at org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl.restoreOverInitializer(BackupManagerImpl.java:616)
      at org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl.restore(BackupManagerImpl.java:1345)
      at org.exoplatform.services.jcr.ext.backup.impl.JobRepositoryRestore.restore(JobRepositoryRestore.java:189)
      ... 1 more
      Caused by: org.exoplatform.services.jcr.config.RepositoryConfigurationException: Database exception. com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'CONFIG' at row 1. SQL: UPDATE JCR_CONFIG SET CONFIG=? WHERE NAME=?
      at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.write(JDBCConfigurationPersister.java:384)
      at org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl.retain(RepositoryServiceConfigurationImpl.java:189)
      ... 4 more
      Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'CONFIG' at row 1
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2983)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
      at org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.write(JDBCConfigurationPersister.java:359)
      ... 5 more

      As I understand the allowable size of the field CONFIG enough that would write a complete configuration of the JCR.
      After tenant creation the full JCR configuration is stored in the table JCR_CONFIG and eventually field size 65KB can be insufficiently.

      For MySQL
      BLOB = L + 2 bytes (max size is 2^16 - 1 or 65,535 bytes, 65KB)
      MEDIUMBLOB = L + 3 bytes (max size is 2^24 - 1 or 16,777,215 bytes, 16MB)
      LONGBLOB = L + 4 bytes (max size is 2^32 - 1 or 4,294,967,295 bytes, 4GB)

      1. We propose to increase the type of field CONFIG to LONGBLOB for MySql
      2. Check other databases on the possibility to write to the field "CONFIG in the table" JCR_CONFIG the data with size of about 100 Mb

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dkatayev Dmytro Katayev
                Reporter:
                skabashnyuk Sergey Kabashnyuk
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h