Error when running APM Agent with WildFly 15.0.1
search cancel

Error when running APM Agent with WildFly 15.0.1

book

Article ID: 233756

calendar_today

Updated On:

Products

CA Application Performance Management SaaS

Issue/Introduction

After deploying the APM Java Agent on WildFly 15.0.1, WildFly fails to start when trying to initialise the LogManager:

22:55:34,118 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.7.Final
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 [email protected]//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)
22:55:34,749 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1

Environment

DX APM SaaS/On Prem
DX APM Java Agent 21.6 and above
Wildfly 15.0.1
JDK 9 and above

 

 

Cause

In JDK 9 and above there is an option to determine if Logger.getLogger is to add a system logger or user logger. You need to add the parameter '-Dsun.util.logging.disableCallerCheck=true' to the WildFly startup to disable this check.

Resolution

You need to add the parameter '-Dsun.util.logging.disableCallerCheck=true' to the WildFly startup in the standalone.bat file. e.g:

set JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.logmanager,org.jboss.byteman,com.wily,com.wily.* -javaagent:D:\APM\wily\21.12\Agent.jar -Dsun.util.logging.disableCallerCheck=true -DagentProfile=D:\APM\wily\21.12\core\config\IntroscopeAgent.profile -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dcom.wily.org.apache.commons.logging.Log=com.wily.org.apache.commons.logging.impl.NoOpLog
set "JAVA_OPTS= -Xbootclasspath/a:D:\wildfly-15.0.1\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.5.Final.jar;D:\wildfly-15.0.1\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.4.0.Final.jar;D:\wildfly-15.0.1\modules\system\layers\base\org\jboss\log4j\logmanager\main\log4j-jboss-logmanager-1.1.6.Final.jar %JAVA_OPTS%"