Build Error Gitblit plugin for gerrit 2.10

414 views
Skip to first unread message

muhammad

unread,
Jan 29, 2015, 1:14:41 PM1/29/15
to repo-d...@googlegroups.com
Hi!

Today I have installed gerrit 2.10 on my server and its working fine. Now for repository browsing I am building gitblit plugin using luca's slides on slideshare, but it gives me compilations errors. I will be very grateful if someone can help me solve this issue or preferably share .jar file which works with gerrit 2.10.

Here is the error log

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 15 source files to /home/user/gitblit-clone/gitblit/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] error: Exception thrown while constructing Processor object: ro/fortsoft/pf4j/ExtensionsIndexer : Unsupported major.minor version 51.0
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27:01.375s
[INFO] Finished at: Thu Jan 29 22:49:08 PKT 2015
[INFO] Final Memory: 25M/227M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project gitblit-plugin: Compilation failure
[ERROR] error: Exception thrown while constructing Processor object: ro/fortsoft/pf4j/ExtensionsIndexer : Unsupported major.minor version 51.0
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:


Thanks for your time.


James Moger

unread,
Jan 29, 2015, 2:08:42 PM1/29/15
to muhammad, repo-discuss@googlegroups.com Discussion
Looks like you might be building with Java 6.  Gitblit requires Java 7.

-J

--
--
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.

Hems Ravi

unread,
Feb 3, 2015, 3:26:30 PM2/3/15
to repo-d...@googlegroups.com, its.muha...@gmail.com
Hi,

I was able to compile gitblit while running java -jar gerrit.war init -d $GERRIT_SITE, I am getting follow exceptions. Any idea how to fix

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gerrit/pgm/init/api/InitStep

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClass(ClassLoader.java:792)

        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

        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:424)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

        at com.google.gerrit.pgm.init.InitPluginStepsLoader.loadInitStep(InitPluginStepsLoader.java:82)

        at com.google.gerrit.pgm.init.InitPluginStepsLoader.getInitSteps(InitPluginStepsLoader.java:61)

        at com.google.gerrit.pgm.init.InitPlugins.initPlugins(InitPlugins.java:148)

        at com.google.gerrit.pgm.init.InitPlugins.run(InitPlugins.java:91)

        at com.google.gerrit.pgm.init.SitePathInitializer.run(SitePathInitializer.java:82)

        at com.google.gerrit.pgm.BaseInit.run(BaseInit.java:110)

        at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:166)

        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)

        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)

        at Main.main(Main.java:25)

Caused by: java.lang.ClassNotFoundException: com.google.gerrit.pgm.init.api.InitStep

        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:424)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

        ... 26 more

Hems Ravi

unread,
Feb 3, 2015, 4:39:41 PM2/3/15
to repo-d...@googlegroups.com, its.muha...@gmail.com
Cloned latest gitblit and compiled (gitblit-plugin-2.11-SNAPSHOT.jar)  but it's not working with gerrit 2.10. Already posted java exception as part gerrit initialization.


On Thursday, January 29, 2015 at 11:08:42 AM UTC-8, James Moger wrote:

Luca Milanesio

unread,
Feb 3, 2015, 4:42:02 PM2/3/15
to Hems Ravi, repo-d...@googlegroups.com, its.muha...@gmail.com
Hi Ravi,
you do need Gerrit 2.11 for running the "latest and greatest" gitblit plugin.

Luca.

Hems Ravi

unread,
Feb 3, 2015, 4:45:18 PM2/3/15
to repo-d...@googlegroups.com, ravi...@gmail.com, its.muha...@gmail.com
I don't find gerrit 2.11 from below URL. Where can I download gerrit 2.11


-Ravi

Luca Milanesio

unread,
Feb 3, 2015, 4:53:41 PM2/3/15
to Hems Ravi, repo-d...@googlegroups.com, its.muha...@gmail.com
Gerrit 2.11 is under development (master branch) but a RC0 will be cut very soon.

You can download the current snapshot from:

HTH

Luca.

Luca Milanesio

unread,
Feb 4, 2015, 3:04:37 AM2/4/15
to Repo and Gerrit Discussion, Hems Ravi
It shouldn't be difficult to rebuild it on Gerrit 2.10: just clone it and change the gerrit version in the pom.xml ... and try it out :-)

Luca.

On 3 Feb 2015, at 22:09, Hems Ravi <ravi...@gmail.com> wrote:

Thank you. Any idea how to make it work gitblit on gerrit 2.10. Tried to using gitblit 2.9.jar getting not found error while browsing git repos

-Ravi

Manuel Coenen

unread,
Feb 9, 2015, 5:18:47 AM2/9/15
to repo-d...@googlegroups.com, ravi...@gmail.com
I tried that and it gives me a wagon-load of compiler errors.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project gitblit-plugin: Compilation failure: Compilation failure:
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritAuthFilter.java:[33,29] error: cannot find symbol
[ERROR] symbol:   class MoreObjects
[ERROR] location: package com.google.common.base
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitUrlsConfig.java:[28,29] error: cannot find symbol
[ERROR] symbol:   class MoreObjects
[ERROR] location: package com.google.common.base
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[17,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[18,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[19,45] error: package com.google.gerrit.pgm.init.api.Section does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[20,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[23,40] error: cannot find symbol
[ERROR] symbol: class InitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[24,16] error: cannot find symbol
[ERROR] symbol:   class ConsoleUI
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[26,16] error: cannot find symbol
[ERROR] symbol:   class Factory
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[29,31] error: cannot find symbol
[ERROR] symbol:   class ConsoleUI
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[29,58] error: package Section does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritAuthFilter.java:[33,29] error: cannot find symbol
[ERROR] symbol:   class MoreObjects
[ERROR] location: package com.google.common.base
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitUrlsConfig.java:[28,29] error: cannot find symbol
[ERROR] symbol:   class MoreObjects
[ERROR] location: package com.google.common.base
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[17,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[18,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[19,45] error: package com.google.gerrit.pgm.init.api.Section does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[20,37] error: package com.google.gerrit.pgm.init.api does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[23,40] error: cannot find symbol
[ERROR] symbol: class InitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[24,16] error: cannot find symbol
[ERROR] symbol:   class ConsoleUI
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[26,16] error: cannot find symbol
[ERROR] symbol:   class Factory
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[29,31] error: cannot find symbol
[ERROR] symbol:   class ConsoleUI
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[29,58] error: package Section does not exist
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritAuthFilter.java:[110,28] error: cannot find symbol
[ERROR] symbol:   variable MoreObjects
[ERROR] location: class GerritAuthFilter
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitUrlsConfig.java:[103,21] error: cannot find symbol
[ERROR] symbol:   variable MoreObjects
[ERROR] location: class GitBlitUrlsConfig
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[36,2] error: method does not override or implement a method from a supertype
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[47,4] error: cannot find symbol
[ERROR] symbol:   class Section
[ERROR] location: class GitBlitInitStep
[ERROR] /home/mcoenen/tmp/gitblit/src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitInitStep.java:[59,2] error: method does not override or implement a method from a supertype

Bo Shi

unread,
Mar 17, 2015, 9:24:37 PM3/17/15
to repo-d...@googlegroups.com, ravi...@gmail.com
Has anyone been able to get the gitblit plugin compiling on Gerrit 2.10?

David Pursehouse

unread,
Mar 17, 2015, 9:40:50 PM3/17/15
to Bo Shi, repo-d...@googlegroups.com, ravi...@gmail.com
I just tried it and found that the stable-2.10 branch of the plugin does
not build.

> error: package com.google.gerrit.pgm.init.api does not exist

this, and most of the other errors, is because the pgm.init package was
restructured and these imports need to be updated.

Also I noticed that the stable-2.10 branch is, for some reason, using
the 2.11-SNAPSHOT API version instead of 2.10

Both of those are fixed in the following change:

https://gerrit-review.googlesource.com/#/c/66371/

If you cherry pick that onto the stable-2.10 branch it should build.

> error: cannot find symbol
> [ERROR] symbol: class MoreObjects
> [ERROR] location: package com.google.common.base
> [ERROR]

I didn't get this error. Just guessing but it looks like this was
caused by having an outdated version of the guava library.
>>>> (gitblit-plugin-2.11-SNAPSHOT.__jar) but it's not
>>>> working with gerrit 2.10. Already posted java
>>>> exception as part gerrit initialization.
>>>>
>>>> On Thursday, January 29, 2015 at 11:08:42 AM UTC-8,
>>>> James Moger wrote:
>>>>
>>>> Looks like you might be building with Java 6.
>>>> Gitblit requires Java 7.
>>>>
>>>> -J
>>>>
>>>> On Thu, Jan 29, 2015 at 1:14 PM, muhammad
>>>> <its.muha...@gmail.com> wrote:
>>>>
>>>> Hi!
>>>>
>>>> Today I have installed gerrit 2.10 on my
>>>> server and its working fine. Now for
>>>> repository browsing I am building gitblit
>>>> plugin using luca's slides on slideshare,
>>>> but it gives me compilations errors. I will
>>>> be very grateful if someone can help me
>>>> solve this issue or preferably share .jar
>>>> file which works with gerrit 2.10.
>>>>
>>>> Here is the error log
>>>>
>>>> Downloaded:
>>>> http://repo.maven.apache.org/__maven2/org/codehaus/plexus/__plexus-utils/3.0/plexus-utils-__3.0.jar
>>>> <http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar>
>>>> (221 KB at 45.3 KB/sec)
>>>> [WARNING] File encoding has not been set,
>>>> using platform encoding UTF-8, i.e. build is
>>>> platform dependent!
>>>> [INFO] Compiling 15 source files to
>>>> /home/user/gitblit-clone/__gitblit/target/classes
>>>> [INFO]
>>>> ------------------------------__------------------------------__-
>>>> [ERROR] COMPILATION ERROR :
>>>> [INFO]
>>>> ------------------------------__------------------------------__-
>>>> [ERROR] error: Exception thrown while
>>>> constructing Processor object:
>>>> ro/fortsoft/pf4j/__ExtensionsIndexer :
>>>> Unsupported major.minor version 51.0
>>>> [INFO] 1 error
>>>> [INFO]
>>>> ------------------------------__------------------------------__-
>>>> [INFO]
>>>> ------------------------------__------------------------------__------------
>>>> [INFO] BUILD FAILURE
>>>> [INFO]
>>>> ------------------------------__------------------------------__------------
>>>> [INFO] Total time: 27:01.375s
>>>> [INFO] Finished at: Thu Jan 29 22:49:08 PKT 2015
>>>> [INFO] Final Memory: 25M/227M
>>>> [INFO]
>>>> ------------------------------__------------------------------__------------
>>>> [ERROR] Failed to execute goal
>>>> org.apache.maven.plugins:__maven-compiler-plugin:2.5.1:__compile
>>>> (default-compile) on project gitblit-plugin:
>>>> Compilation failure
>>>> [ERROR] error: Exception thrown while
>>>> constructing Processor object:
>>>> ro/fortsoft/pf4j/__ExtensionsIndexer :
>>>> Unsupported major.minor version 51.0
>>>> [ERROR] -> [Help 1]
>>>> [ERROR]
>>>> [ERROR] To see the full stack trace of the
>>>> errors, re-run Maven with the -e switch.
>>>> [ERROR] Re-run Maven using the -X switch to
>>>> enable full debug logging.
>>>> [ERROR]
>>>> [ERROR] For more information about the
>>>> errors and possible solutions, please read
>>>> the following articles:
>>>> [ERROR] [Help 1]
>>>> http://cwiki.apache.org/__confluence/display/MAVEN/__MojoFailureException
>>>> <http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException>
>>>>
>>>>
>>>> Thanks for your time.
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> To unsubscribe, email
>>>> repo-discuss...@googlegroups.__com
>>>> More info at
>>>> http://groups.google.com/__group/repo-discuss?hl=en
>>>> <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
>>>> <https://groups.google.com/d/optout>.
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> To unsubscribe, email repo-discuss...@__googlegroups.com
>>>> More info at
>>>> http://groups.google.com/__group/repo-discuss?hl=en
>>>> <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
>>>> <https://groups.google.com/d/optout>.
>>>
>>>
>>> --
>>> --
>>> To unsubscribe, email repo-discuss...@googlegroups.com
>>> More info at
>>> http://groups.google.com/group/repo-discuss?hl=en
>>> <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
>>> <https://groups.google.com/d/optout>.
>>
>>
>
> --
> --
> 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
> <mailto:repo-discuss...@googlegroups.com>.

Bo Shi

unread,
Mar 18, 2015, 8:27:50 PM3/18/15
to David Pursehouse, repo-d...@googlegroups.com, ravi...@gmail.com
Hi David,

Thanks - the patch fixes the compilation issue. When attempting to
load the plugin, I get

Using "mvn install" and then attempting:

ssh gerrit gerrit plugin add
file:///home/gerrit2/.m2/repository/com/googlesource/gerrit/plugins/gitblit/gitblit-plugin/2.10/gitblit-plugin-2.10.jar

I get:

51) Error injecting constructor, java.lang.NoClassDefFoundError:
com/google/common/base/MoreObjects
at com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings.<init>(GitBlitSettings.java:56)
at com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings.class(GitBlitSettings.java:42)
while locating com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings
while locating com.gitblit.IStoredSettings
for parameter 0 at
com.gitblit.manager.RuntimeManager.<init>(RuntimeManager.java:62)
at com.gitblit.manager.RuntimeManager.class(RuntimeManager.java:40)
while locating com.gitblit.manager.RuntimeManager
while locating com.gitblit.manager.IRuntimeManager
for parameter 0 at
com.gitblit.manager.RepositoryManager.<init>(RepositoryManager.java:139)
at com.gitblit.manager.RepositoryManager.class(RepositoryManager.java:104)
while locating com.gitblit.manager.RepositoryManager
while locating com.gitblit.manager.IRepositoryManager
for parameter 2 at
com.gitblit.manager.FederationManager.<init>(FederationManager.java:80)
at com.gitblit.manager.FederationManager.class(FederationManager.java:58)
while locating com.gitblit.manager.FederationManager
while locating com.gitblit.manager.IFederationManager
for parameter 9 at
com.gitblit.manager.GitblitManager.<init>(GitblitManager.java:145)
at com.gitblit.manager.GitblitManager.class(GitblitManager.java:105)
while locating com.gitblit.manager.GitblitManager
while locating com.gitblit.manager.IGitblit
for parameter 2 at
com.gitblit.manager.ServicesManager.<init>(ServicesManager.java:95)
at com.gitblit.manager.ServicesManager.class(ServicesManager.java:72)
while locating com.gitblit.manager.ServicesManager
while locating com.gitblit.manager.IServicesManager
for parameter 11 at
com.gitblit.wicket.GitBlitWebApp.<init>(GitBlitWebApp.java:150)
at com.gitblit.wicket.GitBlitWebApp.class(GitBlitWebApp.java:101)
while locating com.gitblit.wicket.GitBlitWebApp
for parameter 8 at
com.googlesource.gerrit.plugins.gitblit.GerritWicketFilter.<init>(GerritWicketFilter.java:75)
at com.googlesource.gerrit.plugins.gitblit.GerritWicketFilter.class(GerritWicketFilter.java:52)
while locating com.googlesource.gerrit.plugins.gitblit.GerritWicketFilter
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/MoreObjects
at com.googlesource.gerrit.plugins.gitblit.GitBlitUrlsConfig.getGitHttpUrl(GitBlitUrlsConfig.java:103)
at com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings.load(GitBlitSettings.java:89)
at com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings.<init>(GitBlitSettings.java:61)
at com.googlesource.gerrit.plugins.gitblit.app.GitBlitSettings$$FastClassByGuice$$72824050.newInstance(<generated>)
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:107)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1040)
at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:102)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:99)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:220)
at com.google.gerrit.httpd.plugins.HttpPluginServlet.load(HttpPluginServlet.java:186)
at com.google.gerrit.httpd.plugins.HttpPluginServlet.install(HttpPluginServlet.java:160)
at com.google.gerrit.httpd.plugins.HttpPluginServlet.onStartPlugin(HttpPluginServlet.java:150)
at com.google.gerrit.server.plugins.PluginGuiceEnvironment.onStartPlugin(PluginGuiceEnvironment.java:238)
at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:466)
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.run(FutureTask.java:262)
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:368)
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:745)

51 errors

David Pursehouse

unread,
Apr 6, 2015, 11:18:14 PM4/6/15
to tw20...@gmail.com, repo-d...@googlegroups.com, ravi...@gmail.com
With [1] and [2] the plugin compiles and loads on Gerrit built from the
head of stable-2.10, but I have not tested it further than that.

It's possible that it won't actually work as expected; I haven't done
any fixes for the issues mentioned below.

Tomas, would you consider porting your fixes over to the 'official'
plugin on gerrit-review?


[1] https://gerrit-review.googlesource.com/#/c/66889/1
[2] https://gerrit-review.googlesource.com/#/c/66900/1


On 04/06/2015 11:19 PM, tw20...@gmail.com wrote:
>
> On Thursday, March 19, 2015 at 1:27:50 AM UTC+1, Bo Shi wrote:
> [Snip]
>
> When attempting to load the plugin, I get
>
> Using "mvn install" and then attempting:
>
> ssh gerrit gerrit plugin add
> file:///home/gerrit2/.m2/repository/com/googlesource/gerrit/plugins/gitblit/gitblit-plugin/2.10/gitblit-plugin-2.10.jar
>
>
> I get:
>
> 51) Error injecting constructor, java.lang.NoClassDefFoundError:
> com/google/common/base/MoreObjects
> [Snip]
>
>
> That looks like you still built against Guava 18. Gerrit API 2.10
> contains only Guava 17.
>
> Besides, even if you get the gitblit plugin to compile, I strongly
> suspect you'll run against a few runtime problems:
>
> 1. Gerrit API 2.10 includes an old version of the markdown processor
> pegdown (1.2.1). That version is too old for Gitblit which requires at
> least 1.4.2; any display of markdown files in Gitblit, including project
> descriptions, will result in a "server error" from Gitblit.
>
> 2. Gerrit API 2.10 includes and uses Guice 4.0beta5, which does not yet
> include the fix for Guice issue 745:
> https://github.com/google/guice/issues/745 which may give you trouble if
> paths or file names in your repos contain any character that would get
> %-encoded in requests.
>
> 3. Gitblit issue 526
> https://code.google.com/p/gitblit/issues/detail?id=526 may also give you
> trouble if your paths or file names contain strange characters
>
> Maybe just give https://github.com/tomaswolf/gerrit-gitblit-plugin a
> try? I use that with Gerrit 2.9, and there's also a pre-built jar built
> against Gerrit API 2.10.1. It uses the latest official release of
> Gitblit, which is 1.6.2; not the 1.7.0 snapshot.

tw20...@gmail.com

unread,
Apr 7, 2015, 1:57:27 AM4/7/15
to repo-d...@googlegroups.com, david.pu...@sonymobile.com, ravi...@gmail.com

On Thursday, March 19, 2015 at 1:27:50 AM UTC+1, Bo Shi wrote:
[Snip]
When attempting to load the plugin, I get

Using "mvn install" and then attempting:

ssh gerrit gerrit plugin add
file:///home/gerrit2/.m2/repository/com/googlesource/gerrit/plugins/gitblit/gitblit-plugin/2.10/gitblit-plugin-2.10.jar

I get:

51) Error injecting constructor, java.lang.NoClassDefFoundError:
com/google/common/base/MoreObjects
[Snip]

tw20...@gmail.com

unread,
Apr 7, 2015, 2:49:34 AM4/7/15
to repo-d...@googlegroups.com, tw20...@gmail.com, ravi...@gmail.com


On Tuesday, April 7, 2015 at 5:18:14 AM UTC+2, David Pursehouse wrote:
[Snip]

Tomas, would you consider porting your fixes over to the 'official'
plugin on gerrit-review?
[Snip]

David, feel free to "fork back" or whatever my version on github. I have no time to integrate that version into the official repo. (And I don't know that "buck" build system Gerrit is using.)

The question is whether it would be worth the trouble. My version is based only on officially released software (no special Apache Wicket & Rome, uses the latest officially released Gitblit, and no snapshot Gerrit API), but I had to do some quite hairy postprocessing of the shaded jar to get around that pegdown version problem, and the latest official release of Gitblit (1.6.2) still uses dagger, not Guice. Also, I had to hack a bit to get plugin reloading to work. IMO, getting this version back into the official repo would be worth only if there was a strategic decision not to use unreleased software. Which would mean to stick with Gitblit 1.6.2 until James releases a newer version, also for Gerrit 2.11 and on. At least the pegdown hacks could be removed for Gerrit 2.11, as that does include pegdown 1.4.2. OTOH, using Gitblit 1.7.0-snapshot from Gerrit 2.11 on also has its advantages (that Gitblit snapshot no longer uses dagger but Guice).

If you or somebody else attempts to port my version back and encounters problems, I'll be able to answer questions, but I don't have the time to do that re-integration myself.

Luca Milanesio

unread,
Apr 7, 2015, 6:37:31 AM4/7/15
to tw20...@gmail.com, repo-d...@googlegroups.com, david.pu...@sonymobile.com, ravi...@gmail.com
Hi Thomas,
why don’t you contribute your changes to the mainstream gitblit plugin?

Many of them are really useful and many other people would benefit from them.

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.

Tom

unread,
Apr 7, 2015, 8:59:48 AM4/7/15
to Luca Milanesio, repo-d...@googlegroups.com, david.pu...@sonymobile.com
Hi Luca,

On 4/7/15 12:37 , Luca Milanesio wrote:
> Hi Thomas,
> why don’t you contribute your changes to the mainstream gitblit plugin?
>
> Many of them are really useful and many other people would benefit from them.
>
> Luca.
As I wrote before I don't have the time for that, and people who want it
now can get it from GitHub. But feel free to take over whatever you deem
useful.

For Gerrit 2.9 and 2.10, basing the plugin on Giblit 1.6.2 is fine,
though one should probably re-evaluate whether all the machinery I had
added in my 2.9 builds to get clean plugin reloading is still needed in
Gerrit 2.10 with its DynamicItem. Starting with Gerrit 2.11, the
pegdown/parboiled hacks I had to do could be removed. Though perhaps you
might pefer to stick with the Gitblit 1.7.0-snapshot-based (no more
dagger!) plugin you already have for Gerrit 2.11.

Also note that I have actually backported a couple of things (image
diffs and a fix for large text diffs blocking the browser) from Gitblit
1.7.0 into the 1.6.2-based jar I build for this plugin.

In any case somebody well-versed in web security should go through all
the authentication code. As I wrote on GitHub, that's not my home turf.

--
Tom

Luca Milanesio

unread,
Apr 7, 2015, 9:10:34 AM4/7/15
to Tom, repo-d...@googlegroups.com, david.pu...@sonymobile.com
Hi Tom,
I avoided the GitBlit 1.6.x altogether because of the Dag-Nightmare :-)

Other things are really useful however, and I will definitely pull them from your fork.

Thanks for contributing to the project :-)

Luca.
Reply all
Reply to author
Forward
0 new messages