The current logmanager implementation is incompatible with use with the -Xbootclasspath/a option on JDK 11. This is because it is a multi-release jar which is incompatible with -Xbootclasspath/a. This is problematic because to allow Java Agents to work with JBoss Modules based applications (i.e. WildFly and derivatives) often it is necessary to include logmanager in -Xbootclasspath/a .
Here's me starting WildFly with a -Xbootclasspath/a setting and JDK 11:
$ build/target/wildfly-core-7.0.0.CR2-SNAPSHOT/bin/standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /Users/bstansberry/dev/wildfly/wildfly-core/build/target/wildfly-core-7.0.0.CR2-SNAPSHOT JAVA: /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager -Djava.awt.headless=true -Xbootclasspath/a:/Users/bstansberry/dev/wildfly/wildfly-core/dist/target/wildfly-core-7.0.0.CR2-SNAPSHOT/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final.jar -Djava.util.logging.manager=org.jboss.logmanager.LogManager --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED --add-modules=java.se ========================================================================= WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jboss.logmanager.LogLevelInitTask to constructor java.util.logging.Level$KnownLevel(java.util.logging.Level) WARNING: Please consider reporting this to the maintainers of org.jboss.logmanager.LogLevelInitTask WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager") at org.jboss.logmanager.Logger.getLogger(Logger.java:57) at org.jboss.as.server@7.0.0.CR2-SNAPSHOT//org.jboss.as.server.Main.main(Main.java:89) at org.jboss.modules.Module.run(Module.java:352) at org.jboss.modules.Module.run(Module.java:320) at org.jboss.modules.Main.main(Main.java:593)
Right now jboss-logmanager is a multi-release jar. But, per the MR jar spec (https://openjdk.java.net/jeps/238) that is incompatible with -Xbootclasspath:
Multi-release jars and the boot loader
Multi-release JARs are not supported by the boot loader (for example, when a multi-release JAR file is declared with the -Xbootclasspath/a option). Such support would complicate the boot loader implementation for what is considered a rare use-case.
At this point I've identified two java agents that are commonly used with WildFly derived apps that cannot be installed in a JDK 11 environment: Hawkular and the Prometheus jmx-exporter. The former we can work around (i.e. don't install it with JDK 11) as it's use is deprecated and it doesn't work with JDK 11 anyway. But being able to use jmx-exporter is quite important.
- clones
-
LOGMGR-218 JBoss Logmanager is incompatibile with -Xbootclasspath and JDK 11
- Resolved
- is incorporated by
-
JBEAP-16347 (7.2.z) Upgrade jboss-logmanager from 2.1.5.Final-redhat-00001 to 2.1.7.Final
- Closed