NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil in JBoss EAP 7 with security manager enabled

Solution Unverified - Updated -

Issue

Application is failing to initialize org.apache.logging.log4j.util.PropertiesUtil when security manager is enabled

DEBUG [org.wildfly.security.access] (ServerService Thread Pool -- 102) Permission check failed (permission "("java.lang.RuntimePermission" "getClassLoader")" in code source "(vfs:/content/deployment.app.ear/web.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.app.ear.web.war" from Service Module Loader")
DEBUG [org.wildfly.security.access] (ServerService Thread Pool -- 102) Permission check failed (permission "("java.lang.RuntimePermission" "getClassLoader")" in code source "(vfs:/content/deployment.app.ear/web.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.app.ear.web.war" from Service Module Loader")
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 102) MSC000001: Failed to start service jboss.deployment.subunit.”app.ear”.”web.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit.”app.ear”.”web.war".undertow-deployment: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
…
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil
...
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil
  at org.apache.logging.log4j.status.StatusLogger.<clinit>(StatusLogger.java:78)
  at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:60)
  at com.example.log.Log4jLogger.<init>(Log4jLogger.java:11)
...

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content