JavaAgent introscope.log is overriding the application log, SAXNotSupportedException
search cancel

JavaAgent introscope.log is overriding the application log, SAXNotSupportedException

book

Article ID: 406335

calendar_today

Updated On:

Products

DX APM SaaS DX Operational Observability

Issue/Introduction

After enabling the JavaAgent, we have noticed that the JavaAgent introscope.log is overriding the application log, we can see the below exception

How to prevent the issue?

java.lang.ExceptionInInitializerError
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend$Holder.<clinit>(LogbackBackend.java:56)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.getInstance(LogbackBackend.java:68)
...
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.RuntimeException: Unable to configure logger
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.loadLoggerConfiguration(LogbackBackend.java:101)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.<init>(LogbackBackend.java:73)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.<init>(LogbackBackend.java:45)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend$Holder.<clinit>(LogbackBackend.java:54)
... 34 more
Caused by: ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred
at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:89)
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:57)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:151)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.loadLoggerConfiguration(LogbackBackend.java:99)
... 37 more
Caused by: org.xml.sax.SAXNotSupportedException: Feature: http://xml.org/sax/features/external-general-entities
at org.apache.crimson.parser.XMLReaderImpl.setFeature(XMLReaderImpl.java:211)
at org.apache.crimson.jaxp.SAXParserImpl.setFeatures(SAXParserImpl.java:143)
at org.apache.crimson.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:126)
at org.apache.crimson.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:113)
at org.apache.crimson.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:141)
at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:82)
... 43 more
java.lang.NoClassDefFoundError: Could not initialize class com.wily.introscope.agent.feedback.backend.logback.LogbackBackend$Holder
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.getInstance(LogbackBackend.java:68)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackend.getFeedbackBackend(LogbackBackend.java:64)
at com.wily.introscope.agent.feedback.backend.logback.LogbackBackendFactory.getNativeFeedbackBackend(LogbackBackendFactory.java:64)
at com.wily.util.feedback.backend.NativeFeedbackBackendRegistry.getNativeFeedbackBackend(NativeFeedbackBackendRegistry.java:117)
at com.wily.util.feedback.AsynchFeedbackChannel.setConfiguration(AsynchFeedbackChannel.java:90)
a:401)

Environment

DX OI/APM 24.*

Cause

Application or JVM sets Apache Crimson SaxParserFactory as default SaxParser implementation.

When our log framework reads it's XML configuration file it expects default SaxParserFactoryImpl class to be used that does not require additional dependencies.

Since our logging framework cannot properly initialize it defaults to console which captured by customer application log.

Resolution

Updated to JavaAgent 25.8.2 or higher.

NOTE: If the problem persists add -Djaxp.debug=true JVM argument and capture the standard err/output log, contact Broadcom Support for assistance.