Oracle database migration fails after SonarQube CE upgrade from 25.11 to 25.12 version

Hi!

I tried to make an SonarQube Community Edition upgrade hosted on-prem from v. 25.11.0.114957 to latest 25.12.0.117093.

After SQ files were placed on the server and the config was done I opened in my web browser SQ URL with /setup suffix. I proceeded with the upgrade, but it finished with failed status in the web browser.

In the web.log I see the error:

2025.12.12 16:41:49 INFO  web[][DbMigrations] 15/16 #202506025 'Populate 'issue_stats_by_rule_key''...
2025.12.12 16:41:49 ERROR web[][DbMigrations] 15/16 #202506025 'Populate 'issue_stats_by_rule_key'': failure | time=3ms
2025.12.12 16:41:49 ERROR web[][DbMigrations] Executed 14/16 DB migrations: failure | time=1902ms
2025.12.12 16:41:49 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=1934ms
2025.12.12 16:41:49 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 #202506025 'Populate 'issue_stats_by_rule_key'' failed
	at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:105)
	at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:89)
	at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:66)
	at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:55)
	at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:106)
	at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:81)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

https://docs.oracle.com/error-help/db/ora-00933/
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:715)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:615)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1372)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:972)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:237)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:524)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:298)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1510)
	at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:2020)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1633)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3973)
	at oracle.jdbc.driver.OraclePreparedStatement.doExecute(OraclePreparedStatement.java:4447)
	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4433)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1032)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
	at org.sonar.server.platform.db.migration.step.UpsertImpl.execute(UpsertImpl.java:66)
	at org.sonar.server.platform.db.migration.version.v202506.PopulateIssueStatsByRuleKey.execute(PopulateIssueStatsByRuleKey.java:78)
	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:101)
	... 8 common frames omitted
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00933: SQL command not properly ended

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:723)
	... 27 common frames omitted

The database is Oracle 19c patchset 19.28.

JDBC driver from Oracle that is certified with given Java and Database version.

Any change that it can be fixed soon or I need to to rollback to previous version?

Hi,

Welcome to the community!

This error reads like the network connection was interrupted, mid-SQL.

The migration should be re-entrant. I think the thing to do here is restart SonarQube Community Build and try again.

If you want to enable debug logging in your settings first, then if this happens again, the log will give us a better idea of what’s going on. Just be aware that debug server logging gets bit, fast.

 
Ann

1 Like

Hi Piotr,

I will be taking a closer look.

Thanks

1 Like

Hi Ann,

Thanks for the tips. I stopped SonarQube process on the server and set logging to DEBUG. I started the SonarQube process and run the database migration again. The database migration is failing. The error message in the web.log is the same. Here are the entries from the log with some debug information. Maybe it’s more useful to troubleshoot.

2025.12.12 22:47:43 INFO  web
[o.s.s.p.Platform] Database needs to be migrated. Please refer to https://docs.sonarsource.com/sonarqube-community-build/server-upgrade-and-maintenance/upgrade/roadmap/
2025.12.12 22:47:43 INFO  web
[o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@45e69324 [pattern=UrlPattern{inclusions=[/api/system/migrate_db., …], exclusions=[/api/components/update_key, …]}]
2025.12.12 22:47:43 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.NoCacheFilter@3c3cd13a [pattern=UrlPattern{inclusions=[/api/v2/], exclusions=
}]
2025.12.12 22:47:44 DEBUG web
[.s.w.s.H.Mappings] \n	o.s.w.a.MultipleOpenApiWebMvcResource:\n	{GET [/api-docs/{group}], produces [application/json]}: openapiJson(HttpServletRequest,String,String,Locale)\n	{GET [/api-docs.yaml/{group}], produces [application/vnd.oai.openapi]}: openapiYaml(HttpServletRequest,String,String,Locale)
2025.12.12 22:47:44 DEBUG web[][.s.w.s.H.Mappings] \n	o.s.w.a.OpenApiWebMvcResource:\n	{GET [/api-docs], produces [application/json]}: openapiJson(HttpServletRequest,String,Locale)\n	{GET [/api-docs.yaml], produces [application/vnd.oai.openapi]}: openapiYaml(HttpServletRequest,String,Locale)
2025.12.12 22:47:44 DEBUG web
[.s.w.s.H.Mappings] \n	o.s.s.v.a.s.c.DatabaseMigrationsController:\n	{GET [/system/migrations-status]}: getStatus()
2025.12.12 22:47:44 DEBUG web[][.s.w.s.H.Mappings] \n	o.s.s.v.a.s.c.LivenessController:\n	{GET [/system/liveness]}: livenessCheck(String)
2025.12.12 22:47:44 DEBUG web
[.s.w.s.H.Mappings] \n	o.s.s.v.a.s.c.HealthController:\n	{GET [/system/health]}: getHealth(String)
2025.12.12 22:47:44 DEBUG web[][.s.w.s.H.Mappings] ‘beanNameHandlerMapping’ {}
2025.12.12 22:47:44 DEBUG web
[org.jboss.logging] Logging Provider: org.jboss.logging.Log4j2LoggerProvider
2025.12.12 22:47:44 INFO  web
[o.h.v.i.util.Version] HV000001: Hibernate Validator 9.0.1.Final
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.AbstractConfigurationImpl] Setting custom MessageInterpolator of type org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.x.c.ValidationXmlParser] Trying to load META-INF/validation.xml for XML based Validator configuration.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.x.c.ResourceLoaderHelper] Trying to load META-INF/validation.xml via TCCL
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.x.c.ResourceLoaderHelper] Trying to load META-INF/validation.xml via Hibernate Validator’s class loader
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.x.c.ValidationXmlParser] No META-INF/validation.xml found. Using annotation based configuration only.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.r.TraversableResolvers] Cannot find jakarta.persistence.Persistence on classpath. Assuming non Jakarta Persistence environment. All properties will per default be traversable.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000252: Using org.hibernate.validator.internal.engine.DefaultPropertyNodeNameProvider as property node name provider.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator as ValidatorFactory-scoped message interpolator.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
2025.12.12 22:47:44 DEBUG web
[o.h.v.i.e.ValidatorFactoryConfigurationHelper] HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
2025.12.12 22:47:44 DEBUG web
[o.s.s.a.TomcatAccessLog] Tomcat is started
2025.12.12 22:48:09 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=10/60, idle=10/10, active=0, waiting=0)
2025.12.12 22:48:09 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - After  cleanup stats (total=10/60, idle=10/10, active=0, waiting=0)
2025.12.12 22:48:09 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled.
2025.12.12 22:48:36 INFO  web
[o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2025.12.12 22:48:36 INFO  web
[DbMigrations] Executing 2 DB migrations…
2025.12.12 22:48:36 INFO  web
[DbMigrations] 1/2 #202506025 ‘Populate ‘issue_stats_by_rule_key’’…
2025.12.12 22:48:36 DEBUG web
[c.z.h.p.ProxyConnection] HikariPool-1 - Executed rollback on connection oracle.jdbc.driver.T4CConnection@283100e9 due to dirty commit state on close().
2025.12.12 22:48:36 DEBUG web
[c.z.h.pool.PoolBase] HikariPool-1 - Reset (autoCommit) on connection oracle.jdbc.driver.T4CConnection@283100e9
2025.12.12 22:48:36 DEBUG web
[c.z.h.p.ProxyConnection] HikariPool-1 - Executed rollback on connection oracle.jdbc.driver.T4CConnection@45d64d27 due to dirty commit state on close().
2025.12.12 22:48:36 DEBUG web
[c.z.h.pool.PoolBase] HikariPool-1 - Reset (autoCommit) on connection oracle.jdbc.driver.T4CConnection@45d64d27
2025.12.12 22:48:36 ERROR web
[DbMigrations] 1/2 #202506025 ‘Populate ‘issue_stats_by_rule_key’’: failure | time=8ms
2025.12.12 22:48:36 ERROR web
[DbMigrations] Executed 0/2 DB migrations: failure | time=9ms
2025.12.12 22:48:36 ERROR web
[o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=42ms
2025.12.12 22:48:36 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 #202506025 ‘Populate ‘issue_stats_by_rule_key’’ failed
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:105)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:89)
at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:66)
at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:55)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:106)
at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:81)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

https://docs.oracle.com/error-help/db/ora-00933/
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:715)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:615)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1372)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:972)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:237)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:524)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:298)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1510)
at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:2020)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1633)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3973)
at oracle.jdbc.driver.OraclePreparedStatement.doExecute(OraclePreparedStatement.java:4447)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:4433)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1032)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at org.sonar.server.platform.db.migration.step.UpsertImpl.execute(UpsertImpl.java:66)
at org.sonar.server.platform.db.migration.version.v202506.PopulateIssueStatsByRuleKey.execute(PopulateIssueStatsByRuleKey.java:78)
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:101)
… 8 common frames omitted
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00933: SQL command not properly ended

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:723)
... 27 common frames omitted

2025.12.12 22:48:39 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - Before cleanup stats (total=10/60, idle=10/10, active=0, waiting=0)
2025.12.12 22:48:39 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - After  cleanup stats (total=10/60, idle=10/10, active=0, waiting=0)
2025.12.12 22:48:39 DEBUG web
[c.z.h.p.HikariPool] HikariPool-1 - Fill pool skipped, pool has sufficient level or currently being filled.

I also have changed the newest JDBC driver from Oracle web sites ( JDBC and UCP Downloads page ) ojdbc17.jar with SHA1: 69fb53ad2d6f9ab892f94ea1e955a6565030c318. It’s certified with JDK21 and Oracle 19c which I use. The result is the same. The migrations stops on “Populate ‘issue_stats_by_rule_key’” step with the same error.

1 Like

Hi Piotr,

The issue has been identified and a fix is underway.

Thank you for providing your helpful log messages and extra context.

Best,
Alex

2 Likes

We have observed the same issue with 2025.6 version

same here, looking forward to the fix

Same problem here with sonarqube containers 2025.1-developer and 2025.6-developer on Oracle 19c , attempted with jdbc drivers ojdbc8.jar and ojdbc17.jar

Hi all,

Thank y’all for the context and patience with this fix.

This fix will be going out in the 2025.6.1 release.

It’s scheduled for Dec 22nd, 2025.

The is the ticket to track:

Best,
Alex

2 Likes

jira says it is fixed, but no 2025.6.1 version found on the update server → can you give us an update please or a lead, where to get that patch? As there is no rollback possible to the last version this would be really needed, as our testing environment is down since then.

thanks and best regards

Marc

1 Like

I m Also waiting for this release here, with a prod env that s been broken for a week. Please provide the 2025.6.1 containers.

Hi all,

Please see this recent post on the release of SonarQube Server 2025 Release 6.1:

Happy holidays,
Alex

Thank you so much, This release indeed fixed our problem

2 Likes