java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender

Pentaho BI Platform Tracking | Dan Rickner | 1 year ago
  1. 0

    [PDI-14754] log4j error Could not create an Appender - Pentaho BI Platform Tracking

    pentaho.com | 11 months ago
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
  2. 0

    I get strange errors showing up in the Spoon console when executing a job that runs a shell script (bash). The script seems to run fine, but throws these errors into the console for some reason. Never had this on 5.x running the same bash script. {noformat} log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755) at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896) at org.pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:85) at org.pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:71) at org.pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141) at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1006) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755) at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896) at org.pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:85) at org.pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:71) at org.pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141) at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83) Kitchen - Logging is at level : Basic logging at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {noformat}

    Pentaho BI Platform Tracking | 1 year ago | Dan Rickner
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
  3. 0

    I get strange errors showing up in the Spoon console when executing a job that runs a shell script (bash). The script seems to run fine, but throws these errors into the console for some reason. Never had this on 5.x running the same bash script. {noformat} log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755) at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896) at org.pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:85) at org.pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:71) at org.pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141) at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1006) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755) at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896) at org.pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:85) at org.pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:71) at org.pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141) at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89) at org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83) Kitchen - Logging is at level : Basic logging at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {noformat}

    Pentaho BI Platform Tracking | 1 year ago | Dan Rickner
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When start Spoon, in the begining, after karaf starts we see a FileNotFoundException looking for log4j.xml. The exception: {code} log4j:ERROR Could not parse url [file:/C:/Releases/6.0/pdi-ee-6.0.0.0-310/pdi-ee/data-integration/./system/osgi/log4j.xml]. java.io.FileNotFoundException: C:\Releases\6.0\pdi-ee-6.0.0.0-310\pdi-ee\data-integration\.\system\osgi\log4j.xml (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at java.io.FileInputStream.<init>(FileInputStream.java:101) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:765) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:871) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526) at org.apache.log4j.LogManager.<clinit>(LogManager.java:127) at org.apache.log4j.Logger.getLogger(Logger.java:104) at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:262) at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1025) at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:844) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:657) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.<clinit>(ContextLoaderListener.java:253) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4362) at org.apache.felix.framework.Felix.activateBundle(Felix.java:2149) at org.apache.felix.framework.Felix.startBundle(Felix.java:2072) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.lang.Thread.run(Thread.java:745) {code}

    Pentaho BI Platform Tracking | 1 year ago | Emanuel Teixeira
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
  6. 0

    [PDI-14540] java.io.FileNotFoundException - OSGI Log4j.xml not found when start Spoon - Pentaho BI Platform Tracking

    pentaho.com | 11 months ago
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender

    1 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

      org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender

      at org.apache.log4j.xml.DOMConfigurator.parseAppender()
    2. Apache Log4j
      DOMConfigurator.configure
      1. org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248)
      2. org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
      3. org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
      4. org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
      5. org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492)
      6. org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1006)
      7. org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
      8. org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755)
      9. org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896)
      9 frames
    3. org.pentaho.di
      Kitchen$1.call
      1. org.pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:85)
      2. org.pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:71)
      3. org.pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141)
      4. org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104)
      5. org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89)
      6. org.pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83)
      6 frames