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

Migration of custom rules without parameter values is failing on Oracle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.1
    • Fix Version/s: 4.5.2, 5.0
    • Component/s: Database, Rules
    • Labels:
      None

      Description

      The migration AddMissingCustomRuleParameters is not working on Oracle.

      Here's the log error :

      2014.11.04 14:53:23 INFO  web[DbMigration]  ==  AddMissingCustomRuleParameters: migrating =================================
      2014.11.04 14:53:24 ERROR web[o.s.s.d.m.DatabaseMigrator]  Fail to execute database migration: org.sonar.server.db.migrations.v451.AddMissingCustomRuleParametersMigration
      org.apache.ibatis.exceptions.PersistenceException: 
      ### Error updating database.  Cause: org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: java.sql.SQLException: Invalid column type: getInt not implemented for class oracle.jdbc.driver.T4CRowidAccessor
      ### The error may involve org.sonar.core.persistence.migration.v45.Migration45Mapper.insertRuleParameter-Inline
      ### The error occurred while setting parameters
      ### SQL: INSERT INTO rules_parameters (rule_id, name, param_type, default_value, description) VALUES (?, ?, ?, ?, ?)
      ### Cause: org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: java.sql.SQLException: Invalid column type: getInt not implemented for class oracle.jdbc.driver.T4CRowidAccessor
      	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.update(DefaultSqlSession.java:154) ~[mybatis-3.2.7.jar:3.2.7]
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:141) ~[mybatis-3.2.7.jar:3.2.7]
      	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 sun.proxy.$Proxy33.insertRuleParameter(Unknown Source) ~[na:na]
      	at org.sonar.server.db.migrations.v451.AddMissingCustomRuleParametersMigration.execute(AddMissingCustomRuleParametersMigration.java:88) ~[sonar-server-4.5.1.jar:na]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julien.lancelot Julien Lancelot
                Reporter:
                julien.lancelot Julien Lancelot
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: