Few observations during our upgrade to 3.5.6

45 views
Skip to first unread message
unread,
May 7, 2025, 9:50:35 PM (4 days ago) May 7
to Repo and Gerrit Discussion
Hi All,

We have recently upgraded our Gerrit setup to 3.5.6 from 3.2.14. 
We have a HA setup with the help of High Availability plugin. We do not use external refDB.

We were particularly caught off guard with a requirement of a lib during the upgrade process and thought we will request the community to make a point to update the documentation.

We upgrade our Gerrit installation to 3.5.6 and try to start the service. It refuses to come up with the below stack trace.
We got a pointer [1] from an earlier repo discussion about the requirement of a lib. We downloaded the particular lib [2] into our site's /lib directory and the Gerrit started working fine.

I would here by request to add a point in the release notes about this requirement.



stacktrace:

[main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Lcom/gerritforge/gerrit/globalrefdb/validation/SharedRefDbConfiguration;
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
        at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935)
        at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4941)
        at com.google.inject.internal.FailableCache.get(FailableCache.java:54)
        at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
        at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:148)
        at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:606)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:943)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:863)
        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:301)
        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:224)
        at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1092)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1121)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1086)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138)
        at com.google.gerrit.server.plugins.ServerPlugin.startPlugin(ServerPlugin.java:212)
        at com.google.gerrit.server.plugins.ServerPlugin.start(ServerPlugin.java:182)
        at com.google.gerrit.server.plugins.PluginLoader.runPlugin(PluginLoader.java:512)
        at com.google.gerrit.server.plugins.PluginLoader.rescan(PluginLoader.java:426)
        at com.google.gerrit.server.plugins.PluginLoader.start(PluginLoader.java:331)
        at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:95)
        at com.google.gerrit.pgm.Daemon.start(Daemon.java:386)
        at com.google.gerrit.pgm.Daemon.run(Daemon.java:285)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:224)
        at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:120)
        at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:65)
        at Main.main(Main.java:28)
Caused by: java.lang.NoClassDefFoundError: Lcom/gerritforge/gerrit/globalrefdb/validation/SharedRefDbConfiguration;
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3061)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2248)
        at com.google.inject.internal.DeclaredMembers.getDeclaredFields(DeclaredMembers.java:40)
        at com.google.inject.spi.InjectionPoint.getDeclaredFields(InjectionPoint.java:800)
        at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:710)
        at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:423)
        at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:173)
        at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:671)
        at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:628)
        at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:614)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:943)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:863)
        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:301)
        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:224)
        at com.google.inject.internal.InjectorImpl.createParameterInjector(InjectorImpl.java:1035)
        at com.google.inject.internal.InjectorImpl.getParametersInjectors(InjectorImpl.java:1022)
        at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:70)
        at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:30)
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:38)
        at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:34)
        at com.google.inject.internal.FailableCache$1.load(FailableCache.java:43)
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)        
... 33 more
Caused by: java.lang.ClassNotFoundException: com.gerritforge.gerrit.globalrefdb.validation.SharedRefDbConfiguration
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
        at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:904)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
        ... 59 more


Luca Milanesio

unread,
May 7, 2025, 10:43:58 PM (4 days ago) May 7
to Repo and Gerrit Discussion, Luca Milanesio


> On 7 May 2025, at 19:50, [email protected] <[email protected]> wrote:
>
> Hi All,
>
> We have recently upgraded our Gerrit setup to 3.5.6 from 3.2.14.
> We have a HA setup with the help of High Availability plugin. We do not use external refDB.
>
> We were particularly caught off guard with a requirement of a lib during the upgrade process and thought we will request the community to make a point to update the documentation.
>
> We upgrade our Gerrit installation to 3.5.6 and try to start the service. It refuses to come up with the below stack trace.
> We got a pointer [1] from an earlier repo discussion about the requirement of a lib. We downloaded the particular lib [2] into our site's /lib directory and the Gerrit started working fine.
>
> I would here by request to add a point in the release notes about this requirement.
>
> [1]https://groups.google.com/g/repo-discuss/c/DH-ftHMiCyE?pli=1
> [2] https://mvnrepository.com/artifact/com.gerritforge/global-refdb/3.5.6
>
>
> stacktrace:
>
> [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
> com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Lcom/gerritforge/gerrit/globalrefdb/validation/SharedRefDbConfiguration;

You’re missing the global-refdb.jar into the $GERRIT_SITE/lib.

HTH

Luca.
unread,
May 8, 2025, 10:37:17 AM (3 days ago) May 8
to Repo and Gerrit Discussion
Hi Luca,

Yes we found that and used it. My request is to add that info that we need to have that lib in the Gerrit release notes so that everyone knows about it beforehand.

Regards,
Raviraj

Luca Milanesio

unread,
May 8, 2025, 10:39:59 AM (3 days ago) May 8
to Repo and Gerrit Discussion, Luca Milanesio

On 8 May 2025, at 08:37, [email protected] <[email protected]> wrote:

Hi Luca,

Yes we found that and used it. My request is to add that info that we need to have that lib in the Gerrit release notes so that everyone knows about it beforehand.

The global-refdb isn’t part of Gerrit core therefore isn’t included in the release notes.
The release notes are already a colossal effort, including all the details of all plugins won’t be feasible.

Luca.


Regards,
Raviraj

On Thursday, 8 May 2025 at 01:13:58 UTC+5:30 Luca Milanesio wrote:


> On 7 May 2025, at 19:50, [email protected] <[email protected]> wrote:
> 
> Hi All,
> 
> We have recently upgraded our Gerrit setup to 3.5.6 from 3.2.14. 
> We have a HA setup with the help of High Availability plugin. We do not use external refDB.
> 
> We were particularly caught off guard with a requirement of a lib during the upgrade process and thought we will request the community to make a point to update the documentation.
> 
> We upgrade our Gerrit installation to 3.5.6 and try to start the service. It refuses to come up with the below stack trace.
> We got a pointer [1] from an earlier repo discussion about the requirement of a lib. We downloaded the particular lib [2] into our site's /lib directory and the Gerrit started working fine.
> 
> I would here by request to add a point in the release notes about this requirement.
> 
> [1]https://groups.google.com/g/repo-discuss/c/DH-ftHMiCyE?pli=1
> [2] https://mvnrepository.com/artifact/com.gerritforge/global-refdb/3.5.6
> 
> 
> stacktrace:
> 
> [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
> com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: Lcom/gerritforge/gerrit/globalrefdb/validation/SharedRefDbConfiguration;

You’re missing the global-refdb.jar into the $GERRIT_SITE/lib.

HTH

Luca.

-- 
-- 
To unsubscribe, email [email protected]
More info at https://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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/43ecbed2-afbb-4cb1-9783-c1112cdeef7bn%40googlegroups.com.

Matthias Sohn

unread,
May 8, 2025, 11:52:10 AM (3 days ago) May 8
to Luca Milanesio, Repo and Gerrit Discussion
On Thu, May 8, 2025 at 9:39 AM Luca Milanesio <[email protected]> wrote:


On 8 May 2025, at 08:37, [email protected] <[email protected]> wrote:

Hi Luca,

Yes we found that and used it. My request is to add that info that we need to have that lib in the Gerrit release notes so that everyone knows about it beforehand.

The global-refdb isn’t part of Gerrit core therefore isn’t included in the release notes.
The release notes are already a colossal effort, including all the details of all plugins won’t be feasible.

I think this should be added to the documentation of the high-availability plugin.
 

Luca Milanesio

unread,
May 8, 2025, 11:56:28 AM (3 days ago) May 8
to Repo and Gerrit Discussion, Luca Milanesio

On 8 May 2025, at 09:51, Matthias Sohn <[email protected]> wrote:

On Thu, May 8, 2025 at 9:39 AM Luca Milanesio <[email protected]> wrote:


On 8 May 2025, at 08:37, [email protected] <[email protected]> wrote:

Hi Luca,

Yes we found that and used it. My request is to add that info that we need to have that lib in the Gerrit release notes so that everyone knows about it beforehand.

The global-refdb isn’t part of Gerrit core therefore isn’t included in the release notes.
The release notes are already a colossal effort, including all the details of all plugins won’t be feasible.

I think this should be added to the documentation of the high-availability plugin.

The active/active configuraiton is already mentioned at [3].
I am sure it can be improved with Matthias’ contribution :-)

Luca.

Luca Milanesio

unread,
May 8, 2025, 11:59:17 AM (3 days ago) May 8
to Repo and Gerrit Discussion, Luca Milanesio
On 7 May 2025, at 19:50, [email protected] <[email protected]> wrote:

Hi All,

We have recently upgraded our Gerrit setup to 3.5.6 from 3.2.14. 
We have a HA setup with the help of High Availability plugin. We do not use external refDB.

I misread your e-mail: I don’t believe the global-refdb should have been required as *you do not use it*.
I believe this is a bug and should be fixed in the high-availability plugin.

HTH

Luca.

--
--
To unsubscribe, email [email protected]
More info at https://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 [email protected].
Reply all
Reply to author
Forward
0 new messages