[SRU] Maven 3.6.3-1 fails to run with OpenJDK 17
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
guice (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
maven (Debian) |
Fix Released
|
Unknown
|
|||
maven (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Maven 3.6.3-1 fails to run with OpenJDK 16 and 17.
Users building for OpenJDK 17 are unable to use the packaged Maven.
This bug was fixed in Maven 3.6.3-2 (and above)[1]
Packages maven and guice need to be updated in focal to fix this bug.
[Test Plan]
For the version in the release pocket and the version in the proposed pocket, use maven to compile https:/
$ sudo apt install openjdk-17-jdk maven=$VERSION
$ git clone https:/
$ cd quizzes-tutor
$ cd backend
$ mvn clean compile
This should fail for the version in the release pocket, with the error below, and succeed for the version in the proposed pocket.
Sample test script:
```
#!/bin/bash
set -ex
lxc launch ubuntu:focal tester
lxc exec tester -- apt install -y software-
lxc exec tester -- add-apt-repository -y ppa:vpa1977/
lxc exec tester -- apt install -y maven openjdk-
lxc exec tester -- git clone https:/
lxc exec tester -- /bin/sh -c "cd quizzes-
lxc delete -f tester
```
[Where problems could occur]
Guice:
- this SRU installs a new artifact - guice-no-
Maven:
- guice.jar is replaced with guice-no-aop.jar. This is optional[2] functionality and Apache's release of maven 3.6.3 includes `guice-
- Maven should be tested against Java versions present in focal, e.g. test building a sample project:
```
#!/bin/bash
set -ex
for x in openjdk-
lxc launch ubuntu:focal tester
lxc exec tester -- apt install -y software-
lxc exec tester -- add-apt-repository -y ppa:vpa1977/
lxc exec tester -- apt install -y maven $x
lxc exec tester -- git clone https:/
for module in java-multi-modules java-project maven-code-coverage maven-mutation-
lxc exec tester -- /bin/sh -c "cd maven-examples/
done
lxc delete -f tester
done
```
[Original Description]
*System info*:
```
$ lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04
$ apt-cache policy maven
maven:
Installed: 3.6.3-1
Candidate: 3.6.3-1
Version table:
*** 3.6.3-1 500
500 http://
500 http://
100 /var/lib/
$ apt-cache policy openjdk-16-jdk
openjdk-16-jdk:
Installed: 16.0.1+9-1~20.04
Candidate: 16.0.1+9-1~20.04
Version table:
*** 16.0.1+9-1~20.04 500
500 http://
500 http://
500 http://
100 /var/lib/
```
*Summary*
Maven 3.6.3-1 apparently fails to run with OpenJDK 16. It seems to be a bug and was fixed in Maven 3.6.3-2 (and above) according to https:/
*Expected behaviour*
I expect to be able to use maven with all currently supported General Availability Java versions.
*Observed behaviour*
I installed OpenJDK 16 (via PPA, see version above) and tried to compile a Maven project, producing the following output:
```
$ mvn compile
[ERROR] Error executing Maven.
[ERROR] java.lang.
[ERROR] Caused by: Unable to load cache item
[ERROR] Caused by: Could not initialize class com.google.
$ echo $?
1
```
Thanks and kind regards,
-Manu
[1] https:/
[2] https:/
[3] https:/
summary: |
- Maven 3.6.3-1 fails to run with OpenJDK 16 + Maven 3.6.3-1 fails to run with OpenJDK 16 and 17 |
Changed in guice (Ubuntu): | |
status: | New → Confirmed |
summary: |
- Maven 3.6.3-1 fails to run with OpenJDK 16 and 17 + [SRU] Maven 3.6.3-1 fails to run with OpenJDK 17 |
description: | updated |
Changed in maven (Debian): | |
status: | Unknown → Fix Released |
tags: | added: fr-5268 |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
summary: |
- Maven 3.6.3-1 fails to run with OpenJDK 17 + [SRU] Maven 3.6.3-1 fails to run with OpenJDK 17 |
Status changed to 'Confirmed' because the bug affects multiple users.