[
https://issues.redhat.com/browse/WFCORE-4674?page=com.atlassian.jira.plug...
]
Hai Tran commented on WFCORE-4674:
----------------------------------
[^wildfly-bugreport.zip]
This bug is not yet fixed. You can reproduce this bug with the JBoss Modules 1.10.2.Final
and the Wildfly Core 13.0.3.Final on the Wilfyfly 21.0.1.Final with the attached zip
file.
As precondition to reproduce you have to install maven (
https://maven.apache.org/) and
docker desktop (
https://www.docker.com/products/docker-desktop)
Steps to reproduce:
1) Unpack the zip for example under windows to a director c:\tmp
2) Start the windows command line cmd and go to the directory c:\tmp\docker
3) Then go to the directory c:\tmp\docker\helloworld-rs and run the maven command
mvn clean package
4) Then go to the directory c:\tmp\docker\StdoutFilter and run the maven command
mvn clean package
5) Go to the directory c:\tmp\docker and run the following docker command
docker build --tag wildfly-app .
6) Then run the following docker command to verify the created image
"wildfly-app"
docker images
7) Then run the following docker command to start wildfly with the hello-world app
docker run -p 8080:8080 -p 9990:9990 -it wildfly-app
8) Start a browser with the following url to verity the hello-world app is running:
http://localhost:8080/helloworld-rs/rest/json --> OK
9) Then remove the comments around the "stdoutFilter" in the file
"standalone.xml" as follows:
<console-handler name="CONSOLE">
<console-handler name="CONSOLE">
<level name="INFO"/>
<filter-spec value="stdoutFilter"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<filter name="stdoutFilter"
class="org.example.log.filter.StdoutFilter"
module="org.example.filter"/>
10) Then rerun the steps 5 to 7 you will get the following exception in the console:
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)
Custom handlers, formatters and filters cause the server to crash if
the log manager is on the boot class path
--------------------------------------------------------------------------------------------------------------
Key: WFCORE-4674
URL:
https://issues.redhat.com/browse/WFCORE-4674
Project: WildFly Core
Issue Type: Bug
Components: Logging
Reporter: James Perkins
Assignee: James Perkins
Priority: Critical
Labels: OpenShift, jdk11
Fix For: 13.0.0.Beta1, 13.0.0.Final
Attachments: wildfly-bugreport.zip
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:
{code}
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
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)