[wildfly-dev] how a -javaagent can use logging and not blow up WildFly

John Mazzitelli mazz at redhat.com
Sat Mar 4 17:42:50 EST 2017


Regarding this issue:

    https://bugzilla.redhat.com/show_bug.cgi?id=1037970

and the exception message:

    JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"

How would one go about working around this when you have a -javaagent deployed in WildFly/EAP and that agent code actually uses logging?

I've tried a bunch of stuff such as setting the sysprop java.util.logging.manager=org.jboss.logmanager.LogManager (both in standalone.conf and passing in via standalone.sh); in the agent code, first thing is call System.setProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager"); I've tried getting the agent code to sleep and not even do any work until WildFly starts booting (though I'm not sure if some of my classes are getting loaded at the time premain() is called, but I can't see where its importing any logging stuff - unless its happening in low-level Java API code and setting java.util.logging itself?)

There has to be a way to do this - I'm thinking of things like byteman which probably ran into the same thing. I'm hoping there is a simple "oh, you just do this magical step and it works around the problem."



More information about the wildfly-dev mailing list