Error when installing plugin example-simpleSshCommand

15 views
Skip to first unread message

Maria Helena Braga

unread,
Oct 9, 2025, 10:01:19 AM (4 days ago) Oct 9
to Repo and Gerrit Discussion
Hello,

I'm running Gerrit v 3.12.0 in a docker container and I'm developing a plugin to add a new ssh command to it.
I tried installing the plugin example-simpleSshCommand on my instance but it failed with the following error:

[2025-10-09T13:54:27.089Z] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin example-simpleSshCommand
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: NoSuchMethodError: PluginCommandModule: method 'void <init>()' not found
  at SshModule.<init>(SshModule.java:19)
  while locating SshModule

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
PluginCommandModule: "com.google.gerrit.sshd.PluginCommandModule"
SshModule:           "com.googlesource.gerrit.plugins.examples.simplesshcommand.SshModule"
========================
End of classname legend:
========================

at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1151)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1186)
at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:247)
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.NoSuchMethodError: com.google.gerrit.sshd.PluginCommandModule: method 'void <init>()' not found
at com.googlesource.gerrit.plugins.examples.simplesshcommand.SshModule.<init>(SshModule.java:19)
at com.googlesource.gerrit.plugins.examples.simplesshcommand.SshModule$$FastClassByGuice$$47cb3bc7.GUICE$TRAMPOLINE(<generated>)
at com.googlesource.gerrit.plugins.examples.simplesshcommand.SshModule$$FastClassByGuice$$47cb3bc7.apply(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1148)
... 16 more


It looks like com.google.gerrit.sshd.PluginCommandModule has changed or is missing a no-arg constructor.

Has anyone seen this issue before or knows how to make the example plugin compatible with Gerrit 3.12?

Thanks in advance!

syntonyze

unread,
Oct 9, 2025, 10:53:50 AM (4 days ago) Oct 9
to Maria Helena Braga, Repo and Gerrit Discussion
Hey Maria,
I have recently fixed a compilation issue for the `accounts` plugin due to the SshModule API change.
You can get inspiration on how to achieve the same at [1].

Hope it helps


 

Thanks in advance!

--
--
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/6d32edae-cc95-4644-b4c7-937c813e099fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages