PostgreSQL error 'operator does not exist' when upgrading to SonarQube 73

upgrade
database

(Veeresh Reddy) #1

Must-share information (formatted with Markdown):
my sonar version is : 7.3 and database is postgresql 10.5

after i press on upgrade button , it is giving me this error. your help is greatly appreciated.(FYI it is failing after i have restored my postgresql 10.5 database)
the error is as follows:

2018.09.16 15:57:07 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2018.09.16 15:57:08 INFO  web[][DbMigrations] Executing DB migrations...
2018.09.16 15:57:08 INFO  web[][DbMigrations] #2210 'Add 'securityhotspotadmin' permission to templates characteristics already having 'issueadmin''...
2018.09.16 15:57:08 ERROR web[][DbMigrations] #2210 'Add 'securityhotspotadmin' permission to templates characteristics already having 'issueadmin'': failure | time=17ms
2018.09.16 15:57:08 ERROR web[][DbMigrations] Executed DB migrations: failure | time=18ms
2018.09.16 15:57:08 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=121ms
2018.09.16 15:57:08 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #2210 'Add 'securityhotspotadmin' permission to templates characteristics already having 'issueadmin'' failed
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52)
        at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:68)
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105)
        at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: smallint = boolean
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 107
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
        at org.sonar.server.platform.db.migration.step.SelectImpl.scroll(SelectImpl.java:74)
        at org.sonar.server.platform.db.migration.step.MassUpdate.execute(MassUpdate.java:92)
        at org.sonar.server.platform.db.migration.version.v73.PopulateHotspotAdminPermissionOnTemplatesCharacteristics.execute(PopulateHotspotAdminPermissionOnTemplatesCharacteristics.java:61)
        at org.sonar.server.platform.db.migration.step.DataChange.execute(DataChange.java:44)
        at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
        ... 9 common frames omitted
`

2018.09.16 19:17:44 ERROR web[][DbMigrations] #2210 'Add 'securityhotspotadmin' permission to templates characteristics already having 'issueadmin'': failure | time=8ms
Sonar is under maintenance
(Nicolas Bontoux) #2

Hi,

You might want to share the SonarQube version you’re upgrading from for people to get the full context.


(Veeresh Reddy) #3

I am upgrading from 7.2.1 to 7.3 . postgresql version is 10.5.