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

Apache's JIRA Issue Tracker | Helge-Frank Zimpel | 1 year ago
  1. 0

    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

    Apache's JIRA Issue Tracker | 1 year ago | Helge-Frank Zimpel
    ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred
  2. 0

    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

    Apache's JIRA Issue Tracker | 1 year ago | Helge-Frank Zimpel
    ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occurred
  3. 0

    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

    QOS.ch JIRA | 8 years ago | Pavol Juhos
    ch.qos.logback.core.joran.spi.JoranException: Parser configuration error occured
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JSP does not compile in CQ5?

    Stack Overflow | 3 years ago | Oliver
    org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP
  6. 0

    Conflicts between JDK6 and xml-apis

    Stack Overflow | 2 years ago
    java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Java RT
      SAXParserFactory.newInstance
      1. javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:115)
      1 frame
    3. Logback Core Module
      GenericConfigurator.doConfigure
      1. ch.qos.logback.core.joran.event.SaxEventRecorder.buildSaxParser(SaxEventRecorder.java:81)
      2. ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59)
      3. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134)
      4. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
      5. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
      5 frames
    4. Logback Classic Module
      ContextInitializer.autoConfig
      1. ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
      2. ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
      2 frames
    5. SLF4J LOG4J-12 Binding
      StaticLoggerBinder.<clinit>
      1. org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
      2. org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
      2 frames
    6. SLF4J API Module
      LoggerFactory.getLogger
      1. org.slf4j.LoggerFactory.bind(LoggerFactory.java:129)
      2. org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
      3. org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:302)
      4. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:276)
      5. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:288)
      5 frames
    7. org.apache.aries
      Activator.<clinit>
      1. org.apache.aries.subsystem.core.internal.Activator.<clinit>(Activator.java:47)
      1 frame
    8. Java RT
      Class.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      5. java.lang.Class.newInstance(Class.java:442)
      5 frames
    9. Apache Felix Framework
      FrameworkStartLevelImpl.run
      1. org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4474)
      2. org.apache.felix.framework.Felix.activateBundle(Felix.java:2221)
      3. org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
      4. org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
      5. org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
      5 frames
    10. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame