Gerrit 2.9.1: Replication Plugin throws Exception during installation

712 views
Skip to first unread message

Matthew Jordan

unread,
Mar 26, 2015, 1:39:46 AM3/26/15
to repo-d...@googlegroups.com
Hello!

I've recently set up and installed a Gerrit server. Upon installing the replication plugin, the Gerrit server throws the following Exception:

[2015-03-25 20:34:55,924] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin replication
java.lang.NoClassDefFoundError: com/google/gerrit/server/events/Event

I tried a few different methods of installation, in case it was somehow related to an SSH permission issue:

ssh -p PORT USER@SERVER gerrit plugin install -n replication.jar - < replication.jar
com.google.gerrit.server.plugins.PluginInstallException: com/google/gerrit/server/events/Event
    at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:442)
fatal: Plugin failed to install. Cause: com/google/gerrit/server/events/Event

Loading it manually on the server in the plugins directory resulted in the same exception in the logs:

[2015-03-25 20:34:55,924] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin replication
java.lang.NoClassDefFoundError: com/google/gerrit/server/events/Event

Gerrit version: 2.9.1
Replication: build from source (gerrit stable-2.9, replication stable-2.9)

Full stack trace is below:

com.google.gerrit.server.plugins.PluginInstallException: com/google/gerrit/server/events/Event
    at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:442)
    at com.google.gerrit.server.plugins.PluginLoader.installPluginFromStream(PluginLoader.java:184)
    at com.google.gerrit.sshd.commands.PluginInstallCommand.run(PluginInstallCommand.java:98)
    at com.google.gerrit.sshd.SshCommand$1.run(SshCommand.java:35)
    at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:442)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
    at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:364)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoClassDefFoundError: com/google/gerrit/server/events/Event
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
    at java.lang.Class.getDeclaredConstructors(Class.java:1855)
    at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
    at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
    at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:661)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:871)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:798)
    at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:286)
    at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:218)
    at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:994)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1027)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
    at com.google.gerrit.server.plugins.JarPlugin.startPlugin(JarPlugin.java:144)
    at com.google.gerrit.server.plugins.JarPlugin.start(JarPlugin.java:127)
    at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:425)
    ... 13 more
Caused by: java.lang.ClassNotFoundException: com.google.gerrit.server.events.Event
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 30 more
fatal: Plugin failed to install. Cause: com/google/gerrit/server/events/Event

Any help would be appreciated - thanks!



David Pursehouse

unread,
Mar 26, 2015, 4:28:51 AM3/26/15
to Matthew Jordan, repo-d...@googlegroups.com

It looks like you're using the plugin from a later version of gerrit.


--
--
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.
For more options, visit https://groups.google.com/d/optout.

Matthew Jordan

unread,
Mar 26, 2015, 9:36:59 AM3/26/15
to repo-d...@googlegroups.com, mjo...@digium.com


On Thursday, March 26, 2015 at 3:28:51 AM UTC-5, David Pursehouse wrote:

It looks like you're using the plugin from a later version of gerrit.



Ugh. Error between keyboard and screen was indeed the case. Apparently I wasn't *actually* on origin/stable-2.9 on the plugin branch. Correcting that and re-installing fixed the replication issues.

Thanks a lot for the help!
Reply all
Reply to author
Forward
0 new messages