github-plugin with gerrit 3.12 issue

58 views
Skip to first unread message

Åsmund Østvold

unread,
Aug 6, 2025, 11:14:47 AMAug 6
to repo-discuss
Hi All, 

I am attempting to move to gerrit v3.12.1 with github-plugin [1]. I am compiling gerrit and plugins myself for the first time.  The github-plugin version is dd52f958f13afdee670e34864949a9c23173966d (current master). I get the below error. So the question is: does anybody know if github-plugin (master) works with v3.12.1? If it is known to work I am doing something wrong :-( 

I am currently using github-plugin (older version and not compiled by me) with gerrit v3.10.4. I assume https://gerrithub.io uses github-plugin and it is running 3.12.0-592-g4bd1b5ddce.  So my question to gerrithub.io people do you have changes on top of github-plugin [1] master not yet published or is my assumption that it is using github-plugin [1] wrong?

Any information is much appreciated! 

[1] https://gerrit.googlesource.com/plugins/github

PS. I did try gerrit 3.11.4 but got another issue and as I want v3.12... 

[2025-08-06T16:07:09.558+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.12.1
[2025-08-06T16:07:09.580+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.12.1
Aug 06, 2025 4:07:09 PM com.google.inject.servlet.GuiceFilter setPipeline
WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-06T16:07:09.655+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin github-oauth, version null
Aug 06, 2025 4:07:09 PM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi
java.lang.TypeNotPresentException: Type com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi not present
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
        at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
        at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
        at java.base/sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
        at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
        at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
        at java.base/sun.reflect.generics.repository.ConstructorRepository.computeParameterTypes(ConstructorRepository.java:111)
        at java.base/sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:87)
        at java.base/java.lang.reflect.Executable.getGenericParameterTypes(Executable.java:313)
        at java.base/java.lang.reflect.Constructor.getGenericParameterTypes(Constructor.java:287)
        at java.base/java.lang.reflect.Executable.getAllGenericParameterTypes(Executable.java:332)
        at java.base/java.lang.reflect.Executable.getAnnotatedParameterTypes(Executable.java:775)
        at com.google.inject.spi.InjectionPoint.<init>(InjectionPoint.java:101)
        at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:327)
        at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:275)
        at com.google.inject.assistedinject.FactoryProvider2.findMatchingConstructorInjectionPoint(FactoryProvider2.java:622)
        at com.google.inject.assistedinject.FactoryProvider2.<init>(FactoryProvider2.java:336)
        at com.google.inject.assistedinject.FactoryModuleBuilder$1.configure(FactoryModuleBuilder.java:336)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:64)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:426)
        at com.google.inject.AbstractModule.install(AbstractModule.java:106)
        at com.googlesource.gerrit.plugins.github.GuiceHttpModule.configureServlets(GuiceHttpModule.java:72)
        at com.google.inject.servlet.ServletModule.configure(ServletModule.java:52)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:64)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:426)
        at com.google.inject.spi.Elements.getElements(Elements.java:113)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
        at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:240)
        at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:264)
        at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:195)
        at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:523)
        at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:444)
        at com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:344)
        at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:95)
        at com.google.gerrit.pgm.Daemon.start(Daemon.java:415)
        at com.google.gerrit.pgm.Daemon.run(Daemon.java:303)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:62)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:251)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:147)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:92)
        at Main.main(Main.java:30)
Caused by: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
        at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:872)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
        ... 43 more
[2025-08-06T16:07:09.746+02:00] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin github-plugin
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) [Guice/MissingImplementation]: No implementation for ReplicateProjectStep$Factory was bound.
Requested by:
1  : GitImporter.<init>(GitImporter.java:44)
      \_ for 4th parameter replicateFactory
     at HttpSessionProvider.provider(HttpSessionProvider.java:24)
      \_ for field provider
     at GuiceHttpModule.configureServlets(GuiceHttpModule.java:56)
Learn more:
  https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION
2) An exception was caught and reported. Message: Type ReplicationRemotesApi not present
  at GuiceHttpModule.configureServlets(GuiceHttpModule.java:72)
      \_ installed by: GuiceHttpModule -> FactoryModuleBuilder$1


Best regards,
Åsmund

Luca Milanesio

unread,
Aug 6, 2025, 12:41:15 PMAug 6
to repo-discuss, Luca Milanesio

On 6 Aug 2025, at 16:13, Åsmund Østvold <asm...@gmail.com> wrote:

Hi All, 

I am attempting to move to gerrit v3.12.1 with github-plugin [1]. I am compiling gerrit and plugins myself for the first time.  The github-plugin version is dd52f958f13afdee670e34864949a9c23173966d (current master).

The current master should be compatible.

I get the below error. So the question is: does anybody know if github-plugin (master) works with v3.12.1? If it is known to work I am doing something wrong :-( 

We installed it and used with all versions of Gerrit since the beginning: it works with *any* version from v2.10 … up to the latest and greatest master.

I am currently using github-plugin (older version and not compiled by me) with gerrit v3.10.4. I assume https://gerrithub.io uses github-plugin and it is running 3.12.0-592-g4bd1b5ddce. 

That’s correct. Bear in mind that v3.12.0-592-g4bd1b5ddce is on the master branch, not on the stable-3.12.

So my question to gerrithub.io people do you have changes on top of github-plugin [1] master not yet published or is my assumption that it is using github-plugin [1] wrong?

Any information is much appreciated! 

[1] https://gerrit.googlesource.com/plugins/github

PS. I did try gerrit 3.11.4 but got another issue and as I want v3.12... 

[2025-08-06T16:07:09.558+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.12.1
[2025-08-06T16:07:09.580+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.12.1
Aug 06, 2025 4:07:09 PM com.google.inject.servlet.GuiceFilter setPipeline
WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-06T16:07:09.655+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin github-oauth, version null
Aug 06, 2025 4:07:09 PM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi
java.lang.TypeNotPresentException: Type com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi not present

You are missing the replication-api, nothing wrong with the github plugin.
See the replication-api artifact from [1], and download it into the $GERRIT_SITE/plugins.

HTH


Luca.

--
--
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 visit https://groups.google.com/d/msgid/repo-discuss/CA%2BzfM3D1bN9HJFc58E3hKYVrHq9QEA-4L6kTqcGdsNOKBH7_oA%40mail.gmail.com.

Åsmund Østvold

unread,
Aug 7, 2025, 9:09:13 AMAug 7
to Luca Milanesio, repo-discuss
Thank you so much for your feedback Luca.

Inline answers, new info and questions.

On Wed, Aug 6, 2025 at 6:41 PM Luca Milanesio <luca.mi...@gmail.com> wrote:


That’s correct. Bear in mind that v3.12.0-592-g4bd1b5ddce is on the master branch, not on the stable-3.12.

I expected this.  Thanks. 


So my question to gerrithub.io people do you have changes on top of github-plugin [1] master not yet published or is my assumption that it is using github-plugin [1] wrong?

Any information is much appreciated! 

[1] https://gerrit.googlesource.com/plugins/github

PS. I did try gerrit 3.11.4 but got another issue and as I want v3.12... 

[2025-08-06T16:07:09.558+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.12.1
[2025-08-06T16:07:09.580+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.12.1
Aug 06, 2025 4:07:09 PM com.google.inject.servlet.GuiceFilter setPipeline
WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-06T16:07:09.655+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin github-oauth, version null
Aug 06, 2025 4:07:09 PM com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi
java.lang.TypeNotPresentException: Type com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi not present

You are missing the replication-api, nothing wrong with the github plugin.
See the replication-api artifact from [1], and download it into the $GERRIT_SITE/plugins.


I should have released this! I did many things yesterday so now I do not know if I had the replication plugin there or not. But now the replication.jar is in the folder. For some reason I do not understand the replication plugin is loaded after github-oauth. Can I control the load sequence somehow in a configuration file? Could it be that I have done something wrong when creating the github-oauth.jar file? If yes, is there way to investigate a plugin jar file that is dependent on a plugin ? 

[2025-08-07T14:32:18.868+02:00] [main] WARN  com.google.gerrit.server.project.PeriodicProjectListCacheWarmer : project_list cache warmer is disabled
[2025-08-07T14:32:18.869+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Removing stale plugin file: plugin_github-plugin_250807_1230_5671758748801280282.jar
[2025-08-07T14:32:18.870+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /var/lib/private/gerrit/./plugins
Aug 07, 2025 2:32:19 PM com.google.inject.servlet.GuiceFilter setPipeline

WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-07T14:32:19.010+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin code-owners, version v9bf37d8-nix-dirty
[2025-08-07T14:32:19.025+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin codemirror-editor, version v3.12.1
Aug 07, 2025 2:32:19 PM com.google.inject.servlet.GuiceFilter setPipeline

WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-07T14:32:19.051+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v3.12.1
Aug 07, 2025 2:32:19 PM com.google.inject.servlet.GuiceFilter setPipeline

WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-07T14:32:19.087+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin delete-project, version v3.12.1
[2025-08-07T14:32:19.108+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v3.12.1
Aug 07, 2025 2:32:19 PM com.google.inject.servlet.GuiceFilter setPipeline

WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-07T14:32:19.179+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin github-oauth, version null
Aug 07, 2025 2:32:19 PM com.google.inject.internal.MessageProcessor visit

INFO: An exception was caught and reported. Message: java.lang.ClassNotFoundException: com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi
java.lang.TypeNotPresentException: Type com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi not present
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
        at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)

[...]

        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
        ... 43 more
[2025-08-07T14:32:19.271+02:00] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin github-plugin

com.google.inject.CreationException: Unable to create injector, see the following errors:
1) [Guice/MissingImplementation]: No implementation for ReplicateProjectStep$Factory was bound.
Requested by:
1  : GitImporter.<init>(GitImporter.java:44)
      \_ for 4th parameter replicateFactory
     at HttpSessionProvider.provider(HttpSessionProvider.java:24)
      \_ for field provider
     at GuiceHttpModule.configureServlets(GuiceHttpModule.java:56)
Learn more:
  https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION
2) An exception was caught and reported. Message: Type ReplicationRemotesApi not present
  at GuiceHttpModule.configureServlets(GuiceHttpModule.java:72)
      \_ installed by: GuiceHttpModule -> FactoryModuleBuilder$1
2 errors
======================
Full classname legend:
======================
FactoryModuleBuilder$1:       "com.google.inject.assistedinject.FactoryModuleBuilder$1"
GitImporter:                  "com.googlesource.gerrit.plugins.github.git.GitImporter"
GuiceHttpModule:              "com.googlesource.gerrit.plugins.github.GuiceHttpModule"
HttpSessionProvider:          "com.googlesource.gerrit.plugins.github.oauth.HttpSessionProvider"
ReplicateProjectStep$Factory: "com.googlesource.gerrit.plugins.github.git.ReplicateProjectStep$Factory"
ReplicationRemotesApi:        "com.googlesource.gerrit.plugins.replication.api.ReplicationRemotesApi"
========================
End of classname legend:
========================
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:589)

[...]

        at java.base/java.lang.Class.forName(Class.java:534)
        at java.base/java.lang.Class.forName(Class.java:513)
        at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
        ... 43 more
[2025-08-07T14:32:19.292+02:00] [main] INFO  com.google.gerrit.server.config.FileBasedGlobalPluginConfigProvider : No /var/lib/private/gerrit/./etc/gitiles.config; assuming defaults
Aug 07, 2025 2:32:19 PM com.google.inject.servlet.GuiceFilter setPipeline

WARNING: Multiple Servlet injectors detected. This is a warning indicating that you have more than one GuiceFilter running in your web application. If this is deliberate, you may safely ignore this message. If this is NOT deliberate however, your application may not work as expected.
[2025-08-07T14:32:19.301+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.12.1
[2025-08-07T14:32:19.324+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v3.12.1
Aug 07, 2025 2:32:19 PM com.google.inject.assistedinject.FactoryProvider2 isValidForOptimizedAssistedInject
WARNING: AssistedInject factory com.googlesource.gerrit.plugins.replication.Destination$Factory will be slow because class com.googlesource.gerrit.plugins.replication.Destination has assisted Provider dependencies or injects the Injector. Stop injecting @Assisted Provider<T> (instead use @Assisted T) or Injector to speed things up. (It will be a ~6500% speed bump!)  The exact offending deps are: [Key[type=com.google.inject.Injector, annotation=[none]]@com.googlesource.gerrit.plugins.replication.Destination.<init>()[0]]
[2025-08-07T14:32:19.398+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin replication, version v3.12.1
[2025-08-07T14:32:19.415+02:00] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v3.12.1
[2025-08-07T14:32:19.418+02:00] [main] INFO  com.google.gerrit.server.config.ScheduleConfig : No schedule configuration for "accountDeactivation".
[2025-08-07T14:32:19.418+02:00] [main] INFO  com.google.gerrit.server.config.ScheduleConfig : No schedule configuration for "draftCommentsCleanup".
[2025-08-07T14:32:19.429+02:00] [main] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit APACHE-SSHD-2.15.0 on *:29419


From the log I see  Loaded plugin github-oauth, version null Could the "version null" cause this problem? 

Regards,
Åsmund

Åsmund Østvold

unread,
Aug 8, 2025, 7:01:04 AMAug 8
to Luca Milanesio, repo-discuss
On Wed, Aug 6, 2025 at 6:41 PM Luca Milanesio <luca.mi...@gmail.com> wrote:

You are missing the replication-api, nothing wrong with the github plugin.

I apologize my dyslexia missed "-api" and only read "replication"

And it is working now..

Regards,
Åsmund

Reply all
Reply to author
Forward
0 new messages