Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4674

Custom handlers, formatters and filters cause the server to crash if the log manager is on the boot class path

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:

      Description

      If the log manager is on the boot class path with Java 11, -Xbootclasspath/a:jboss-logmanager.jar, and a custom handler, formatter or filter is used the server will fail to boot as the log manager can't see the types in jboss-modules. This seems due to the fact that the log manager is on the boot class path and jboss-modules is on the system class path.

      Example exception:

      Failed to read or configure the org.jboss.logmanager.LogManager
      java.lang.IllegalArgumentException: Failed to load module "org.jboss.logmanager" for formatter "JSON"
          at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:65)
          at org.jboss.logmanager.config.FormatterConfigurationImpl.<init>(FormatterConfigurationImpl.java:30)
          at org.jboss.logmanager.config.LogContextConfigurationImpl.addFormatterConfiguration(LogContextConfigurationImpl.java:172)
          at org.jboss.logmanager.PropertyConfigurator.configureFormatter(PropertyConfigurator.java:631)
          at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:701)
          at org.jboss.logmanager.PropertyConfigurator.configureLogger(PropertyConfigurator.java:583)
          at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:521)
          at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
          at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:170)
          at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:132)
          at java.util.logging.LogManager$3.run(LogManager.java:399)
          at java.util.logging.LogManager$3.run(LogManager.java:396)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
          at java.util.logging.LogManager.access$800(LogManager.java:145)
          at java.util.logging.LogManager$2.run(LogManager.java:345)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
          at java.util.logging.LogManager.getLogManager(LogManager.java:378)
          at org.jboss.modules.Main.main(Main.java:523)
      Caused by: java.lang.NoClassDefFoundError: org/jboss/modules/ModuleLoader
          at org.jboss.logmanager.config.AbstractPropertyConfiguration$ModuleFinder.getClassLoader(AbstractPropertyConfiguration.java:556)
          at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:63)
          ... 19 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jamezp James Perkins
                  Reporter:
                  jamezp James Perkins
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated: