We are trying to update a Gerrit 3.2.7 instance to Gerrit 3.5.2.
We understand that Gerrit 3.5 requires openjdk 11, and so we have installed openjdk 11 and made it default (using update-alternatives) and specified the appropriate path in gerrit.config under container.javaHome.
Now we get the following error when we try to run gerrit.sh start:
[2024-11-05T07:39:38.628-05:00] [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
We understand that Jakarta XML Bindings (jaxb) library is no longer bundled with openjdk as of version 11, so this must be a familiar issue.
Trying to install jaxb in RHEL8, we got the output shown below.
We downloaded gerrit-3.5.2.war from here:
https://gerrit-releases.storage.googleapis.com/gerrit-3.5.2.warDo we need to recmopile this version of Gerrit to include jaxb libraries? Is there another method to introduce jaxb that the system will pick it up?
Any pointers appreciated.
Regards,
Robert Gregory
$ sudo yum search jaxb-api4
Updating Subscription Management repositories.
======================= Name Exactly Matched: jaxb-api4 ========================
jaxb-api4.noarch : Jakarta XML Binding API
$ sudo yum install jaxb-api4
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS 45 kB/s | 2.4 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - Supplem 39 kB/s | 2.1 kB 00:00
Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 ( 35 kB/s | 2.1 kB 00:00
AMD CUSTOM RHEL8 38 kB/s | 2.1 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStre 55 kB/s | 2.8 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
jaxb-api4 noarch 4.0.0-2.module+el8.8.0+18042+89a504d5
rhel-8-for-x86_64-appstream-rpms 121 k
Installing dependencies:
jakarta-activation2 noarch 2.1.1-2.module+el8.8.0+18042+89a504d5
rhel-8-for-x86_64-appstream-rpms 73 k
Transaction Summary
================================================================================
Install 2 Packages
Total size: 194 k
Installed size: 230 k
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] jakarta-activation2-2.1.1-2.module+el8.8.0+18042+89a504d5.noarch.rpm: Already downloaded
[SKIPPED] jaxb-api4-4.0.0-2.module+el8.8.0+18042+89a504d5.noarch.rpm: Already downloaded
Running transaction check
No available modular metadata for modular package 'jakarta-activation2-2.1.1-2.module+el8.8.0+18042+89a504d5.noarch', it cannot be installed on the system
No available modular metadata for modular package 'jaxb-api4-4.0.0-2.module+el8.8.0+18042+89a504d5.noarch', it cannot be installed on the system
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: No available modular metadata for modular package
$