Starting wildfly local from IntelliJ or command line throws the below error.
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:90)
at org.jboss.modules.Module.run(Module.java:353)
at org.jboss.modules.Module.run(Module.java:321)
at org.jboss.modules.Main.main(Main.java:604)
From command line,
standalone.bat -mp {JBOSS-HOME}/modules -logmodule org.jboss.logmanager org.jboss.as.standalone -b localhost --server-config=standalone.xml -Djboss.server.base.dir={JBOSS-HOME}\standalone
JAVA_OPTS:
-server
-Xms64m
-Xmx512m
-Dorg.jboss.resolver.warning=true
-Djava.net.preferIPv4Stack=true
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager
-Djava.awt.headless=true
"-Dorg.jboss.boot.log.file={JBOSS-HOME}/standalone/log/boot.log"
"-Dlogging.configuration=file:{JBOSS-HOME}/standalone/configuration/logging.properties"
"-Djboss.home.dir={JBOSS-HOME}"
-Dorg.jboss.logmanager.nocolor=true
-Djboss.bind.address.management=localhost
-javaagent:../standalone/lib/ext/perfmon4j.jar=-ecom.{CUSTOM},-ecom.{CUSTOM},-acom.{CUSTOM},-acom.{CUSTOM},-eSQL,-pAUTO,-eVALVE,-f../bin/perfmonconfig.xml
-Djboss.management.http.port=9980
-Djboss.management.https.port=9993
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Xbootclasspath/a:{JBOSS-HOME}\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.6.0.Final.jar
-Xbootclasspath/a:{JBOSS-HOME}\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.18.Final.jar
Java version: 17
Wildfly version: 26
I am using same options in IntelliJ as well.
I tried all the solutions I could find and none of them are working.
Tried adding the below to JAVA_OPTS and did not work
-Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:{JBOSS-HOME}\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.6.0.Final.jar -Xbootclasspath/a:{JBOSS-HOME}\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.18.Final.jar
Instead of setting your agent in the
JAVA_OPTSset it in theMODULE_OPTS. This will allow the log manager to be setup before your agent access a logger and should resolve this issue.You can set the
MODULE_OPTSas an environment variable or in thestandalone.conf(.bat|.ps1).Setting the agent in the
MODULE_OPTSdoes not require the boot class path to be used either.