ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • See https://issues.apache.org/jira/browse/SLING-4425. I've tried to remove {{org.apache.sling.fragment.xml}} and replace it with {{org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/2.4.0}} using {{Sling Launchpad 8}}. This results into incompatibilities after restarting Sling: Reported exception: ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:88) at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at org.apache.sling.commons.log.logback.internal.Activator.isSlf4jInitialized(Activator.java:108) at org.apache.sling.commons.log.logback.internal.Activator.start(Activator.java:54) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2220) at org.apache.felix.framework.Felix.startBundle(Felix.java:2138) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1365) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:115) at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:81) ... 19 more
    via by Helge-Frank Zimpel,
  • See https://issues.apache.org/jira/browse/SLING-4425. I've tried to remove {{org.apache.sling.fragment.xml}} and replace it with {{org.apache.servicemix.specs/org.apache.servicemix.specs.jaxp-api-1.4/2.4.0}} using {{Sling Launchpad 8}}. This results into incompatibilities after restarting Sling: Reported exception: ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:88) at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at org.apache.sling.commons.log.logback.internal.Activator.isSlf4jInitialized(Activator.java:108) at org.apache.sling.commons.log.logback.internal.Activator.start(Activator.java:54) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2220) at org.apache.felix.framework.Felix.startBundle(Felix.java:2138) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1365) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:115) at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:81) ... 19 more
    via by Helge-Frank Zimpel,
  • When running in OSGi environment, JoranConfigurator throws a ClassCastException when trying to parse the Logback XML configuration file. The problem seems to be caused by OSGi-unfriendly JAXP parser discovery mechanism as suggested by Dieter Wimberger in his blog post -- http://wimpi.coalevo.net/2008/04/hack-how-to-use-logback.html "[...] JAXP discovery mechanism assume visibility of the parser through the context ClassLoader of the actual thread, which may cause some troubles." Observed exception stack trace: Failed to auto configure default logger context Reported exception: ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occured at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:63) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:105) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:76) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:40) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:47) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:108) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:56) at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:189) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:112) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:105) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:235) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:221) at com.foo.bar.server.config.Configuration.<clinit>(Configuration.java:244) at com.foo.bar.server.ServerBundleActivator.start(ServerBundleActivator.java:39) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589) at org.apache.felix.framework.Felix._startBundle(Felix.java:1671) at org.apache.felix.framework.Felix.startBundle(Felix.java:1588) at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1180) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:265) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:56) ... 21 more
    via by Pavol Juhos,
  • jar error
    via GitHub by easch
    ,
  • JSP does not compile in CQ5?
    via Stack Overflow by Oliver
    ,
  • Conflicts between JDK6 and xml-apis
    via by Unknown author,
    • ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:88) at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:129) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302) at org.apache.sling.commons.log.logback.internal.Activator.isSlf4jInitialized(Activator.java:108) at org.apache.sling.commons.log.logback.internal.Activator.start(Activator.java:54) at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2220) at org.apache.felix.framework.Felix.startBundle(Felix.java:2138) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1365) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:115) at ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:81) ... 19 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,