ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream

QOS.ch JIRA | Bob Walker | 4 years ago
  1. 0

    Trying to run basic logback example with Jansi support; it fails because the Win32 call to GetConsoleScreenBufferInfo returns 0. MSDN docs state: "If the function fails, the return value is zero. To get extended error information, call GetLastError." The logged call to GetLastError returns "T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y ." Odd. 22:04:25,922 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI WindowsAnsiOutputStream for the console. 22:04:25,944 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch. qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:74) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:42) at at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:94) at at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:85) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:318) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:197) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:183) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281) at at blah.AnsiTest.<clinit>(AnsiTest.java:7) at at blah.AnsiTestTest.testIt(AnsiTestTest.java:13) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at at java.lang.reflect.Method.invoke(Method.java:597) at at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115) at at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at at java.lang.reflect.Method.invoke(Method.java:597) at at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at at $Proxy0.invoke(Unknown Source) at at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.reflect.InvocationTargetException at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69) at ... 52 common frames omitted Caused by: java.io.IOException: Could not get the screen info: T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y . at at org.fusesource.jansi.WindowsAnsiOutputStream.getConsoleInfo(WindowsAnsiOutputStream.java:104) at at org.fusesource.jansi.WindowsAnsiOutputStream.<init>(WindowsAnsiOutputStream.java:97) at ... 57 common frames omitted

    QOS.ch JIRA | 4 years ago | Bob Walker
    ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
  2. 0

    Trying to run basic logback example with Jansi support; it fails because the Win32 call to GetConsoleScreenBufferInfo returns 0. MSDN docs state: "If the function fails, the return value is zero. To get extended error information, call GetLastError." The logged call to GetLastError returns "T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y ." Odd. 22:04:25,922 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI WindowsAnsiOutputStream for the console. 22:04:25,944 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch. qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:74) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:42) at at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:94) at at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:85) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:318) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:197) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:183) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281) at at blah.AnsiTest.<clinit>(AnsiTest.java:7) at at blah.AnsiTestTest.testIt(AnsiTestTest.java:13) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at at java.lang.reflect.Method.invoke(Method.java:597) at at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35) at at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115) at at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97) at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at at java.lang.reflect.Method.invoke(Method.java:597) at at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at at $Proxy0.invoke(Unknown Source) at at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69) Caused by: java.lang.reflect.InvocationTargetException at at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69) at ... 52 common frames omitted Caused by: java.io.IOException: Could not get the screen info: T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y . at at org.fusesource.jansi.WindowsAnsiOutputStream.getConsoleInfo(WindowsAnsiOutputStream.java:104) at at org.fusesource.jansi.WindowsAnsiOutputStream.<init>(WindowsAnsiOutputStream.java:97) at ... 57 common frames omitted

    QOS.ch JIRA | 4 years ago | Bob Walker
    ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
  3. 0

    GitHub comment 327#185280373

    GitHub | 10 months ago | wismill
    ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    logback warning with cygwin

    GitHub | 2 years ago | ruifigueira
    ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream
  6. 0

    Glassfish 4 with SLF4J - Colored Console Output using Jansi

    Stack Overflow | 3 years ago | JDC
    java.io.IOException: Could not get the screen info: T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y .

    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.io.IOException

      Could not get the screen info: T h e o p e r a t i o n c o m p l e t e d s u c c e s s f u l l y .

      at org.fusesource.jansi.WindowsAnsiOutputStream.getConsoleInfo()
    2. SBT
      WindowsAnsiOutputStream.<init>
      1. org.fusesource.jansi.WindowsAnsiOutputStream.getConsoleInfo(WindowsAnsiOutputStream.java:104)
      2. org.fusesource.jansi.WindowsAnsiOutputStream.<init>(WindowsAnsiOutputStream.java:97)
      2 frames
    3. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      4 frames
    4. Logback Core Module
      GenericConfigurator.doConfigure
      1. ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:69)
      2. ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:42)
      3. ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:94)
      4. ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:85)
      5. ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:96)
      6. ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:318)
      7. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:197)
      8. ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:183)
      9. ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
      10. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157)
      11. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143)
      12. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106)
      13. ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56)
      13 frames
    5. 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:148)
      2 frames
    6. SLF4J LOG4J-12 Binding
      StaticLoggerBinder.<clinit>
      1. org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
      2. org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54)
      2 frames
    7. SLF4J API Module
      LoggerFactory.getLogger
      1. org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
      2. org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
      3. org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
      4. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
      5. org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
      5 frames
    8. blah
      AnsiTestTest.testIt
      1. blah.AnsiTest.<clinit>(AnsiTest.java:7)
      2. blah.AnsiTestTest.testIt(AnsiTestTest.java:13)
      2 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    10. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      13 frames
    11. JUnit4 Provider
      JUnit4Provider.invoke
      1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
      2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
      3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
      3 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    13. SureFire
      ProviderFactory$ClassLoaderProxy.invoke
      1. org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
      1 frame
    14. Unknown
      $Proxy0.invoke
      1. $Proxy0.invoke(Unknown Source)
      1 frame
    15. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
      2. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
      3 frames