Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream #1521

Closed
zulq opened this issue Apr 12, 2019 · 7 comments
Closed

Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream #1521

zulq opened this issue Apr 12, 2019 · 7 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@zulq
Copy link

zulq commented Apr 12, 2019

Steps to Reproduce

  1. Create new app using cli

Expected Behaviour

Run without errors

Actual Behaviour

Got the following error:
16:16:04,758 |-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:69) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:40) at at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:88) at at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:79) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383) at at io.micronaut.runtime.Micronaut.<clinit>(Micronaut.java:46) at at micronaut.jdbi.Application.main(Application.kt:9) Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream at at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56) at ... 23 common frames omitted

Environment Information

  • Operating System: Windows
  • Micronaut Version: 1.1.0
  • JDK Version: 11.0.1
@graemerocher graemerocher added the type: bug Something isn't working label Apr 12, 2019
@uwohlfeil
Copy link

I can reproduce this error behavior.

Environment Information

  • Operating System: Microsoft Windows 10 Pro (10.0.17134 N/A Build 17134)
  • Micronaut Version: 1.1.0
  • JDK Versions: Oracle JDK 1.8.0_131 (x64) and openjdk version "11.0.1"

@graemerocher
Copy link
Contributor

It seems to be in the ansi color logging in logback.xml on Windows causing problems.

@zulq
Copy link
Author

zulq commented Apr 15, 2019

Is there an easy way to enable Jansi with MN? This article Springboot logging under point 8. JANSI on Windows, describe the problem and solution.

@graemerocher
Copy link
Contributor

You can simply follow the same steps as described in the referenced Spring Boot post

@zulq
Copy link
Author

zulq commented Apr 15, 2019

I followed that article and added Jansi as a dependency but still getting the same error. However by editing logback.xml and setting <withJansi>fasle</withJansi> the error disappears.

@graemerocher
Copy link
Contributor

We will make that setting false on Windows by default

@alokkumarsinha
Copy link

On Windows 10, using VS Code with Maven and Gradle extensions installed, it is still happening and doing this (..However by editing logback.xml and setting fasle</withJansi>...) fixed the problem.

eis added a commit to eis/micronaut-hello-world that referenced this issue Jun 11, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 16, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 16, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 17, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 17, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 17, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 18, 2023
fniephaus added a commit to graalvm/native-build-tools that referenced this issue Oct 18, 2023
melix pushed a commit to melix/native-build-tools that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants