rename-project plugin would not load

157 views
Skip to first unread message

adrien...@gmail.com

unread,
Apr 12, 2021, 4:28:35 PM4/12/21
to Repo and Gerrit Discussion
We just downloaded the jar of the rename-project plugin version 3.3 from this Gerrit CI site: plugin-rename-project-bazel-stable-3.3 [Jenkins] (gerritforge.com).

However, after placing it on the plugins location in the server (/apps/scm/gerrit/plugins) and restarting Gerrit, we encountered an issue about java incompatibility.

We are currently using jdk1.8.0_66 and Gerrit v3.1.8 on our site.

Question is, is there another Gerrit CI environment that build the plugins using JDK8 or OpenJDK8?

[2021-04-12 13:12:52,852] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_rename-project_210412_1158_2790575080835725903.jar

[2021-04-12 13:12:52,853] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /apps/scm/gerrit/plugins

[2021-04-12 13:12:53,168] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin codemirror-editor, version v3.1.8

[2021-04-12 13:12:53,360] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v3.1.8

[2021-04-12 13:12:53,620] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.1.8

[2021-04-12 13:12:53,815] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.1.8

[2021-04-12 13:12:53,973] [main] INFO  com.google.gerrit.server.config.PluginConfigFactory : No /apps/scm/gerrit/etc/gitiles.config; assuming defaults

[2021-04-12 13:12:54,057] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.1.8

[2021-04-12 13:12:54,435] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v3.1.8

[2021-04-12 13:12:54,628] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories...

[2021-04-12 13:12:54,629] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories... Done

[2021-04-12 13:12:54,660] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v3.1.8

[2021-04-12 13:12:54,663] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin rename-project

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/renameproject/Module has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Matthias Sohn

unread,
Apr 12, 2021, 4:53:52 PM4/12/21
to adrien...@gmail.com, Repo and Gerrit Discussion
On Mon, Apr 12, 2021 at 10:28 PM adrien...@gmail.com <adrien...@gmail.com> wrote:
We just downloaded the jar of the rename-project plugin version 3.3 from this Gerrit CI site: plugin-rename-project-bazel-stable-3.3 [Jenkins] (gerritforge.com).

However, after placing it on the plugins location in the server (/apps/scm/gerrit/plugins) and restarting Gerrit, we encountered an issue about java incompatibility.

We are currently using jdk1.8.0_66 and Gerrit v3.1.8 on our site.

Question is, is there another Gerrit CI environment that build the plugins using JDK8 or OpenJDK8?

On Gerrit CI 2.16, 3.1 and 3.2 are built using Java 8, higher versions are built using Java 11 [1].
Gerrit 3.3 still supports Java 8 so you should be able to build that yourself. Find build instructions here [2].


-Matthias

[2021-04-12 13:12:52,852] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_rename-project_210412_1158_2790575080835725903.jar

[2021-04-12 13:12:52,853] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /apps/scm/gerrit/plugins

[2021-04-12 13:12:53,168] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin codemirror-editor, version v3.1.8

[2021-04-12 13:12:53,360] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v3.1.8

[2021-04-12 13:12:53,620] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.1.8

[2021-04-12 13:12:53,815] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.1.8

[2021-04-12 13:12:53,973] [main] INFO  com.google.gerrit.server.config.PluginConfigFactory : No /apps/scm/gerrit/etc/gitiles.config; assuming defaults

[2021-04-12 13:12:54,057] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.1.8

[2021-04-12 13:12:54,435] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v3.1.8

[2021-04-12 13:12:54,628] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories...

[2021-04-12 13:12:54,629] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories... Done

[2021-04-12 13:12:54,660] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v3.1.8

[2021-04-12 13:12:54,663] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin rename-project

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/renameproject/Module has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/95e77561-840b-444b-b49a-c23634cc8e15n%40googlegroups.com.

Luca Milanesio

unread,
Apr 12, 2021, 4:56:42 PM4/12/21
to Repo and Gerrit Discussion, Luca Milanesio

On 12 Apr 2021, at 21:28, adrien...@gmail.com <adrien...@gmail.com> wrote:

We just downloaded the jar of the rename-project plugin version 3.3 from this Gerrit CI site: plugin-rename-project-bazel-stable-3.3 [Jenkins] (gerritforge.com).

However, after placing it on the plugins location in the server (/apps/scm/gerrit/plugins) and restarting Gerrit, we encountered an issue about java incompatibility.

We are currently using jdk1.8.0_66 and Gerrit v3.1.8 on our site.

Why would you use the plugin from Gerrit v3.3 on top of Gerrit v3.1? 
Can you just use the correct on at [1] instead?


Question is, is there another Gerrit CI environment that build the plugins using JDK8 or OpenJDK8?

Gerrit v3.1 and v3.2 are available for Java 8.
Gerrit v3.3 and v3.4 are available for Java 11.

[2021-04-12 13:12:52,852] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_rename-project_210412_1158_2790575080835725903.jar

[2021-04-12 13:12:52,853] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /apps/scm/gerrit/plugins

[2021-04-12 13:12:53,168] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin codemirror-editor, version v3.1.8

[2021-04-12 13:12:53,360] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v3.1.8

[2021-04-12 13:12:53,620] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.1.8

[2021-04-12 13:12:53,815] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.1.8

[2021-04-12 13:12:53,973] [main] INFO  com.google.gerrit.server.config.PluginConfigFactory : No /apps/scm/gerrit/etc/gitiles.config; assuming defaults

[2021-04-12 13:12:54,057] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.1.8

[2021-04-12 13:12:54,435] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v3.1.8

[2021-04-12 13:12:54,628] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories...

[2021-04-12 13:12:54,629] [WorkQueue-2] INFO  com.googlesource.gerrit.plugins.deleteproject.fs.RepositoryCleanupTask : Cleaning up expired git repositories... Done

[2021-04-12 13:12:54,660] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin plugin-manager, version v3.1.8

[2021-04-12 13:12:54,663] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin rename-project

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/renameproject/Module has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0



You are simply using a plugin built for Gerrit v3.3 on top of a Gerrit v3.1, which, in your case, has also the wrong Java version.
Just use the [1] and it will load as expected.

HTH

Luca.

References:

David Ostrovsky

unread,
Apr 12, 2021, 5:25:26 PM4/12/21
to Repo and Gerrit Discussion
On Monday, April 12, 2021 at 10:28:35 PM UTC+2 adrien...@gmail.com wrote:
We just downloaded the jar of the rename-project plugin version 3.3 from this Gerrit CI site: plugin-rename-project-bazel-stable-3.3 [Jenkins] (gerritforge.com).

However, after placing it on the plugins location in the server (/apps/scm/gerrit/plugins) and restarting Gerrit, we encountered an issue about java incompatibility.

We are currently using jdk1.8.0_66 and Gerrit v3.1.8 on our site.

May be use the right version of the plugin for the gerrit version you are using?

Your gerrit version is 3.1.8, so that the right version of the plugin is built from
the stable-3.1 branch: [1].


adrien...@gmail.com

unread,
Apr 13, 2021, 8:50:16 AM4/13/21
to Repo and Gerrit Discussion
Thanks to all the responses. 

I believe that what confused me is how I interpreted the version of this plugin. I thought that the higher the version, the latest it is and so I should use it regardless of the Gerrit version that we currently use.

Although I actually tried loading all three versions (3.3, 3.2 and 3.1) prior to posting this question and found that 3.1 is the version that was loaded properly. But so to be sure that it is the right one that we should be used, I posted the question here.

Again thanks to all your responses. It definitely helps me to move forward with testing and using the plugin.

Adrien

Luca Milanesio

unread,
Apr 13, 2021, 9:31:00 AM4/13/21
to Repo and Gerrit Discussion, Luca Milanesio

On 13 Apr 2021, at 13:50, adrien...@gmail.com <adrien...@gmail.com> wrote:

Thanks to all the responses. 

I believe that what confused me is how I interpreted the version of this plugin. I thought that the higher the version, the latest it is and so I should use it regardless of the Gerrit version that we currently use.

Although I actually tried loading all three versions (3.3, 3.2 and 3.1) prior to posting this question and found that 3.1 is the version that was loaded properly. But so to be sure that it is the right one that we should be used, I posted the question here.

Again thanks to all your responses. It definitely helps me to move forward with testing and using the plugin.

No problem, and thanks for your feedback.

I personally think that the Gerrit plugin loader should warn when is loading a plugin that was built against a potentially incompatible version.
Something like “WARN plugin which was built against Gerrit v3.3 has been loaded but it may not work, please double-check that it is the expected version”

Luca.



Adrien
On Monday, April 12, 2021 at 5:25:26 PM UTC-4 David Ostrovsky wrote:
On Monday, April 12, 2021 at 10:28:35 PM UTC+2 adrien...@gmail.com wrote:
We just downloaded the jar of the rename-project plugin version 3.3 from this Gerrit CI site: plugin-rename-project-bazel-stable-3.3 [Jenkins] (gerritforge.com).

However, after placing it on the plugins location in the server (/apps/scm/gerrit/plugins) and restarting Gerrit, we encountered an issue about java incompatibility.

We are currently using jdk1.8.0_66 and Gerrit v3.1.8 on our site.

May be use the right version of the plugin for the gerrit version you are using?

Your gerrit version is 3.1.8, so that the right version of the plugin is built from
the stable-3.1 branch: [1].



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

adrien...@gmail.com

unread,
Apr 13, 2021, 4:42:01 PM4/13/21
to Repo and Gerrit Discussion
HI Luca,

Just a follow-up question.

Is it normal for the rename-plugin to show as SNAPSHOT version from the Plugins list in the Gerrit UI?

Example view from the plugins list:

Plugin Name          Version    API Version                 Status
rename-project  93c1fb7d8c    3.1.14-SNAPSHOT         Enabled
replication          v3.1.8            3.1.8                                 Enabled

Adrien

David Ostrovsky

unread,
Apr 13, 2021, 5:54:24 PM4/13/21
to Repo and Gerrit Discussion
On Tuesday, April 13, 2021 at 10:42:01 PM UTC+2 adrien...@gmail.com wrote:
HI Luca,

Just a follow-up question.

Is it normal for the rename-plugin to show as SNAPSHOT version from the Plugins list in the Gerrit UI?

Example view from the plugins list:

Plugin Name          Version    API Version                 Status
rename-project  93c1fb7d8c    3.1.14-SNAPSHOT         Enabled
replication          v3.1.8            3.1.8                                 Enabled


That's correct. There are actually two versions:

Plugin Version: 93c1fb7d8c
API Version: 3.1.14-SNAPSHOT

That's because according to release procedure, we always bump version to SNAPSHOT: [1],
when release is done.

Now, during the build of plugins on stable branch, this API version is recorded. For example this
is the change that bumped gerrit version to 3.1.14-SNAPSHOT on stable-3.1 branch.



Sven Selberg

unread,
Apr 14, 2021, 3:55:31 AM4/14/21
to Repo and Gerrit Discussion
On Tuesday, April 13, 2021 at 11:54:24 PM UTC+2 David Ostrovsky wrote:
On Tuesday, April 13, 2021 at 10:42:01 PM UTC+2 adrien...@gmail.com wrote:
HI Luca,

Just a follow-up question.

Is it normal for the rename-plugin to show as SNAPSHOT version from the Plugins list in the Gerrit UI?

Example view from the plugins list:

Plugin Name          Version    API Version                 Status
rename-project  93c1fb7d8c    3.1.14-SNAPSHOT         Enabled

Not entirely related:
Would it be feasible to default plugin-version to something like $API_VERSION~$ABBREV_SHA1 when it's not built from a tag?'
If so it would make it easier to see compatibility of none-core plugins.
Reply all
Reply to author
Forward
0 new messages