DEBUG logging for java.io.serialization cannot be enabled in EAP 7
Environment
- JBoss Enterprise Application Platform (EAP)
- 7.x
Issue
- In a standalone application or deployed to Tomcat, we can enable logging for
java.io.serializationand see output as expected from thejava.io.ObjectInputStreamclass as below. But we cannot see any such logs with equivalentjava.io.serializationlog settings on EAP:
java.io.ObjectInputStream filterCheck
FINE: ObjectInputFilter REJECTED: class foobar, array length: -1, nRefs: 1, depth: 1, bytes: 77, ex: n/a
Resolution
- Update to EAP 7.4.13+ or 8.0.2+
Root Cause
- When "java.base" module code, like the ObjectInputStream class, calls System.getLogger(), a "system logger" is created and its' configuration is merged with our configured jboss-logging logger instance via
Logger.mergeWithSystemLogger(sysLogger). During this merging operation the handlers are not transferred from our configured logger instance, so the system logger ends up with no handlers and so no DEBUG enabled for "java.io.serialization". - This content is not included.MODULES-439
- This content is not included.JBEAP-25270
- This content is not included.JBEAP-25284
SBR
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.