Gerrit and github plugin issue

422 views
Skip to first unread message

Fire Lord

unread,
May 16, 2018, 2:51:37 AM5/16/18
to Repo and Gerrit Discussion
can anyone help me to get github plugin working so that i can replicate repos from my github org...


[gerrit]
        basePath = git
        serverId = f3475d2f-4596-440a-9cef-835dff074b93
        canonicalWebUrl = https://gerrit.pixelexperience.org
[database]
        type = mysql
        hostname = localhost
        database = reviewdb
        username = gerrit
[index]
        type = LUCENE
[auth]
        type = HTTP
        httpHeader = GITHUB_USER
        httpExternalIdHeader = GITHUB_OAUTH_TOKEN
        loginUrl = /login
        loginText = Sign-in with GitHub
        registerPageUrl = "/#/register"
[receive]
        enableSignedPush = true
[sendemail]
        smtpServer = smtp.gmail.com
        smtpServerPort = 587
        smtpEncryption = TLS
        smtpUser = *************@gmail.com
[container]
        user = gerrit
        javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = proxy-https://*:8080/
        filterClass = com.googlesource.gerrit.plugins.github.oauth.OAuthFilter
[cache]
        directory = cache
[github]
        url = https://github.com
        apiUrl = https://api.github.com
        clientId = ***************
        scopes = USER_EMAIL,PUBLIC_REPO,READ_ORG
[plugins]
    allowRemoteAdmin = true


********here is the error***********

[2018-05-15 20:36:49,323] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin github-plugin
java.lang.NoClassDefFoundError: com/google/gerrit/server/account/CapabilityControl$Factory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at com.google.inject.assistedinject.FactoryProvider2.findMatchingConstructorInjectionPoint(FactoryProvider2.java:493)
        at com.google.inject.assistedinject.FactoryProvider2.<init>(FactoryProvider2.java:293)
        at com.google.inject.assistedinject.FactoryModuleBuilder$1.configure(FactoryModuleBuilder.java:334)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.AbstractModule.install(AbstractModule.java:122)
        at com.googlesource.gerrit.plugins.github.GuiceHttpModule.configureServlets(GuiceHttpModule.java:51)
        at com.google.inject.servlet.ServletModule.configure(ServletModule.java:55)
        at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
        at com.google.inject.spi.Elements.getElements(Elements.java:110)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
        at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:232)
        at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:242)
        at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:192)
        at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:491)
        at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:419)
        at com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:324)
        at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:92)
        at com.google.gerrit.pgm.Daemon.start(Daemon.java:349)
        at com.google.gerrit.pgm.Daemon.run(Daemon.java:256)
        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:223)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:119)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
        at Main.main(Main.java:24)
Caused by: java.lang.ClassNotFoundException: com.google.gerrit.server.account.CapabilityControl$Factory
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 34 more
[2018-05-15 20:36:49,477] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin hooks, version v2.15.1
[2018-05-15 20:36:49,687] [main] INFO  com.googlesource.gerrit.plugins.replication.ReplicationFileBasedConfig : Config file /home/gerrit/etc/replication.config is empty; not replicating

Luca Milanesio

unread,
May 16, 2018, 2:53:18 AM5/16/18
to Fire Lord, Luca Milanesio, Repo and Gerrit Discussion
Where did you download the github plugin from?
Which version is it?

It seems you got a compatibility issue with Gerrit 2.15.1, which means you are using the wrong plugin version.

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

Reply all
Reply to author
Forward
0 new messages