[
https://issues.redhat.com/browse/WFCORE-5248?page=com.atlassian.jira.plug...
]
James Perkins moved JBEAP-20876 to WFCORE-5248:
-----------------------------------------------
Component/s: Logging
(was: Logging)
Fix Version/s: (was: 7.3.6.GA)
Key: WFCORE-5248 (was: JBEAP-20876)
Affects Version/s: (was: 7.3.4.GA)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Project: WildFly Core (was: JBoss Enterprise Application Platform)
[GSS](7.3.z) TCCL should be set to logging custom-handler module
----------------------------------------------------------------
Key: WFCORE-5248
URL:
https://issues.redhat.com/browse/WFCORE-5248
Project: WildFly Core
Issue Type: Bug
Components: Logging
Reporter: James Perkins
Assignee: James Perkins
Priority: Major
Attachments: reproducer-overlay.zip
When trying to specify the EvaluatorClass where the class exists in the module
custom.evaluator , it fails with a ClassNotFound because the TCL is
org.jboss.as.standalone instead of custom.evaluator module:
{code}
Loader.getTCL return: ModuleClassLoader for Module "org.jboss.as.standalone"
from local module loader @6adede5 (finder: local module finder @2d928643 (roots:
/tmp/jboss-eap-7.3/modules,/tmp/jboss-eap-7.3/modules/system/layers/base))
log4j:ERROR Could not instantiate class [org.apache.log4j.asm.INFOLevelEvaluator].
java.lang.ClassNotFoundException: org.apache.log4j.asm.INFOLevelEvaluator from [Module
"org.jboss.log4j.logmanager" version 1.2.0.Final-redhat-00001 from local module
loader @6adede5 (finder: local module finder @2d928643 (roots:
/tmp/jboss-eap-7.3/modules,/tmp/jboss-eap-7.3/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:197)
at
org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:326)
at org.apache.log4j.net.SMTPAppender.setEvaluatorClass(SMTPAppender.java:549)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:217)
at
org.jboss.logmanager.config.AbstractPropertyConfiguration$1.applyPostCreate(AbstractPropertyConfiguration.java:197)
at
org.jboss.logmanager.config.LogContextConfigurationImpl.doApplyPostCreate(LogContextConfigurationImpl.java:313)
at
org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:345)
at
org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:289)
at
org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:298)
at
org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:546)
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:457)
{code}
{code}
<custom-handler name="email"
class="org.apache.log4j.net.SMTPAppender"
module="custom.evaluator">
<level name="INFO"/>
<filter-spec
value="match("WFLYSRV0025")"/>
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<properties>
<property name="EvaluatorClass"
value="org.apache.log4j.asm.INFOLevelEvaluator"/>
...
</properties>
</custom-handler>
{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)