-
Bug
-
Resolution: Done-Errata
-
Major
-
None
-
None
-
False
-
-
False
-
-
We have seen cases where the java link wasn't there for container builds. It looks like installation of jolokia-jvm-agent drags in java-1.8.0-openjdk-headless which also changes the java alternative. In some cases a force removal of java-1.8.0-openjdk-headless could potentially break the java alternative. Since I wasn't able to reproduce this myself, I've produced this patch and tried a build on an affected system which worked:
diff --git a/modules/jboss.container.java.singleton-jdk/configure.sh b/modules/jboss.container.java.singleton-jdk/configure.sh index 0ad9ce4..b03e905 100755 --- a/modules/jboss.container.java.singleton-jdk/configure.sh +++ b/modules/jboss.container.java.singleton-jdk/configure.sh @@ -14,3 +14,6 @@ fi # Clean up any java-* packages that have been installed that do not match # our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9) rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}") +# Ensure currently installed JDK alternative for 'java' works +_arch="$(uname -i)" +alternatives --set java java-${JAVA_VERSION}-${JAVA_VENDOR}.${_arch}
However, we need to properly upstream this to the singleton-jdk module in order for this to not re-appear.
- clones
-
OPENJDK-2372 [rhel-9] jboss.container.java.singleton-jdk might break 'java' alternative
- Closed
- links to
-
RHBA-2023:123726 Updated RHEL-8-based Middleware container images