Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7594

Fail to index a component which name is longer than 400 characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6
    • Component/s: Database
    • Labels:

      Description

      When project name is longer than 400 characters, then the indexed substrings are too long for the db column RESOURCE_INDEX.KEE. The root pb is not the name length, but the length of indexed substrings. It's useless to index so long combinations. No users will type dozens of characters when searching for a component.

      2016.05.04 14:57:40 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVR72GAAzHkf9TDQJbaF
      org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      ### Cause: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.select(DefaultSqlSession.java:130) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.select(DefaultSqlSession.java:118) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.sonar.db.DbSession.select(DbSession.java:96) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.BatchSession.select(BatchSession.java:52) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.component.ResourceIndexDao.doIndexProject(ResourceIndexDao.java:121) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.component.ResourceIndexDao.indexProject(ResourceIndexDao.java:72) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.component.ResourceIndexDao.indexProject(ResourceIndexDao.java:61) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.step.IndexComponentsStep.execute(IndexComponentsStep.java:43) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) [sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) [sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-5.6-SNAPSHOT.jar:na]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_80]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_80]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_80]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
      Caused by: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error committing transaction.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.sonar.db.DbSession.commit(DbSession.java:41) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.BatchSession.commit(BatchSession.java:168) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.BatchSession.increment(BatchSession.java:205) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.BatchSession.insert(BatchSession.java:125) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) ~[mybatis-3.2.7.jar:3.2.7]
      	at com.sun.proxy.$Proxy45.insert(Unknown Source) ~[na:na]
      	at org.sonar.db.component.ResourceIndexDao.insertIndexEntries(ResourceIndexDao.java:199) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.component.ResourceIndexDao.doIndex(ResourceIndexDao.java:135) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.component.ResourceIndexDao$3.handleResult(ResourceIndexDao.java:127) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.callResultHandler(DefaultResultSetHandler.java:306) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.storeObject(DefaultResultSetHandler.java:300) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:292) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:266) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:239) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:150) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:60) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BatchExecutor.doQuery(BatchExecutor.java:87) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.select(DefaultSqlSession.java:128) ~[mybatis-3.2.7.jar:3.2.7]
      	... 21 common frames omitted
      Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.component.ResourceIndexMapper.insert (batch index #2) failed. 1 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174) ~[mybatis-3.2.7.jar:3.2.7]
      	... 46 common frames omitted
      Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'kee' at row 1
      	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1607) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1272) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103) ~[mybatis-3.2.7.jar:3.2.7]
      	... 51 common frames omitted
      Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'kee' at row 1
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3833) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2535) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1911) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2145) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2081) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2066) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1568) ~[mysql-connector-java-5.1.35.jar:5.1.35]
      	... 55 common frames omitted
      

        Attachments

        1. backgroudtask_failed.log
          18 kB
          Christophe Levis
        2. sonar.log
          16 kB
          Christophe Levis

          Issue Links

            Activity

              People

              Assignee:
              simon.brandhof Simon Brandhof (Inactive)
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: