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

Cross-project duplications fail on Postgres 8.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.2
    • Component/s: Database, Duplications
    • Labels:
      None

      Description

      Caused by: org.apache.ibatis.exceptions.PersistenceException: 
      ### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "hash"
        Position: 32
      ### The error may exist in org.sonar.core.duplication.DuplicationMapper
      ### The error may involve org.sonar.core.duplication.DuplicationMapper.selectCandidates-Inline
      ### The error occurred while setting parameters
      ### SQL: SELECT DISTINCT to_blocks.hash hash, res.kee resourceKey, to_blocks.index_in_file indexInFile, to_blocks.start_line startLine, to_blocks.end_line endLine     FROM duplications_index to_blocks, duplications_index from_blocks, snapshots snapshot, projects res     WHERE from_blocks.snapshot_id = ?     AND to_blocks.hash = from_blocks.hash     AND to_blocks.snapshot_id = snapshot.id     AND snapshot.islast = true     AND snapshot.project_id = res.id     AND res.language = ?
      ### Cause: org.postgresql.util.PSQLException: ERROR: syntax error at or near "hash"
        Position: 32
      	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
      	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:95)
      	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:124)
      	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:90)
      	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
      	at $Proxy54.selectCandidates(Unknown Source)
      	at org.sonar.core.duplication.DuplicationDao.selectCandidates(DuplicationDao.java:42)
      	at org.sonar.plugins.cpd.index.DbDuplicationsIndex.prepareCache(DbDuplicationsIndex.java:65)
      	at org.sonar.plugins.cpd.index.SonarDuplicationsIndex.getByResource(SonarDuplicationsIndex.java:57)
      	at org.sonar.plugins.cpd.SonarEngine.detect(SonarEngine.java:139)
      	at org.sonar.plugins.cpd.SonarEngine.analyse(SonarEngine.java:97)
      	at org.sonar.plugins.cpd.CpdSensor.analyse(CpdSensor.java:76)
      	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
      	at org.sonar.batch.phases.Phases.execute(Phases.java:97)
      	at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:128)
      	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
      	at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:114)
      	at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:104)
      	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
      	at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121)
      	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
      	at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:73)
      	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60)
      	at org.sonar.maven.SonarMojo.execute(SonarMojo.java:150)
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: