Error while upgrading to 25.6.0.109173

Upgrading from 25.5.0.107428 to 25.6.0.109173 and running in to an issue.

OS: Mac 14.5 (23F79)
Java:
java version “21.0.4” 2024-07-16 LTS
Java™ SE Runtime Environment (build 21.0.4+8-LTS-274)
Java HotSpot™ 64-Bit Server VM (build 21.0.4+8-LTS-274, mixed mode, sharing)

Steps to upgrade:

  1. I do have DB and old instance backup.
  2. Remove these folders not for mac.

rm -rf sonarqube-$new_version/bin/linux-x86-64
rm -rf sonarqube-$new_version/bin/windows-x86-64
rm -rf sonarqube-$new_version/bin/winsw-license

  1. Copy plugins from old servers to new server.
    checkstyle-sonar-plugin-10.23.0.jar
    sonar-findbugs-plugin-4.4.2.jar
    sonar-pmd-plugin-4.0.1.jar

  2. Start the new server and run /setup

Logs are attached. logs.zip (14.0 KB)

Error from web.log

2025.07.03 18:01:13 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2025.07.03 18:01:13 INFO  web[][DbMigrations] Executing 8 DB migrations...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 1/8 #202503038 'Add 'graph_version' column to 'architecture_graphs' table'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 1/8 #202503038 'Add 'graph_version' column to 'architecture_graphs' table': success | time=31ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 2/8 #202503039 'Add assignee name to SCA issues releases'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 2/8 #202503039 'Add assignee name to SCA issues releases': success | time=8ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 3/8 #202503040 'Drop assignee name from SCA issues releases'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 3/8 #202503040 'Drop assignee name from SCA issues releases': success | time=7ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 4/8 #202503041 'Remove AssigneeName from Sca issue release changes'...
2025.07.03 18:01:13 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2025.07.03 18:01:13 INFO  web[][DbMigrations] 4/8 #202503041 'Remove AssigneeName from Sca issue release changes': success | time=4ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 5/8 #202503042 'Remove non-canonical from Sca encountered licenses'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 5/8 #202503042 'Remove non-canonical from Sca encountered licenses': success | time=1ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 6/8 #202503043 'Add 'policy_updated_at' to Sca license profiles'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 6/8 #202503043 'Add 'policy_updated_at' to Sca license profiles': success | time=4ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 7/8 #202503044 'Populate 'policy_updated_at' column for Sca license profiles'...
2025.07.03 18:01:13 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2025.07.03 18:01:13 INFO  web[][DbMigrations] 7/8 #202503044 'Populate 'policy_updated_at' column for Sca license profiles': success | time=2ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] 8/8 #202503045 'Update 'policy_updated_at' column for Sca license profiles to be not nullable'...
2025.07.03 18:01:13 INFO  web[][DbMigrations] 8/8 #202503045 'Update 'policy_updated_at' column for Sca license profiles to be not nullable': success | time=2ms
2025.07.03 18:01:13 INFO  web[][DbMigrations] Executed 8/8 DB migrations: success | time=61ms
2025.07.03 18:01:13 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB Migration and container restart: success | time=112ms
2025.07.03 18:01:13 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2025.07.03 18:01:13 INFO  web[][o.s.s.s.PropertiesDBCleaner] Clean up properties from db
2025.07.03 18:01:13 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin PMD [pmd]
        at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:81)
        at org.sonar.server.platform.platformlevel.PlatformLevel4.configureLevel(PlatformLevel4.java:765)
        at org.sonar.server.platform.platformlevel.PlatformLevel.configure(PlatformLevel.java:70)
        at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:214)
        at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:197)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:365)
        at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:116)
        at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:349)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/profiles/ProfileExporter
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
        at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
        at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
        at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:135)
        at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
        at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:97)
        at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:86)
        at org.sonar.plugins.pmd.PmdPlugin.define(PmdPlugin.java:42)
        at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:71)
        ... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.api.profiles.ProfileExporter
        at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
        at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:97)
        at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:86)
        ... 22 common frames omitted
2025.07.03 18:01:13 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2025.07.03 18:01:14 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2025.07.03 18:01:14 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.

Also seeing this on my Docker deployment, migrating from sonarqube:25.5.0.107428-community.

Only change was to update the image version, then ran the migration. Same error message as above.

Hello @zodac @himanshu.pathak ,

The error you encountered during the upgrade is known and has been addressed in the sonar-pmd-plugin project. You can find more details in the following issues on GitHub: Issue #508 and Issue #509.

I recommend using version 4.0.2 or 4.0.3, which can be found here: PMD Releases.

Please let me know if you have any questions.

Best regards,
Abdel

Thanks for the quick response @Bachri_Abdel . Upgraded the plugin to the latest 4.0.3 and that resolves the issue. thanks.

1 Like