[logback-dev] [JIRA] (LOGBACK-1340) Color support and OSGi

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Sep 13 18:21:00 CEST 2017


Antonio Facciorusso created LOGBACK-1340:
--------------------------------------------

             Summary: Color support and OSGi
                 Key: LOGBACK-1340
                 URL: https://jira.qos.ch/browse/LOGBACK-1340
             Project: logback
          Issue Type: Bug
          Components: logback-classic
    Affects Versions: 1.2.3
         Environment: Equinox OSGi environment running on Windows 10 Pro 64bit.

Logback: 1.2.3

Jansi: 1.16
            Reporter: Antonio Facciorusso
            Assignee: Logback dev list
         Attachments: logback-classic-jansi-error.log

The following exception is thrown when _"<withJansi>true</withJansi>"_ is used with  ConsoleAppender on Windows (full stack trace in attached log file):

 

_16:39:40,801 |-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)_

...


_Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream cannot be found by ch.qos.logback.classic_1.2.3_
 _at at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)_
 _at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)_
 _at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)_
 _at at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)_
 _at at java.lang.ClassLoader.loadClass(ClassLoader.java:357)_
 _at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:56)_
 _at ... 49 common frames omitted_

the jansi library correctly exports this package and logback-core correctly imports the same package.

It seems that the following entry is missing in logback-classic's MANIFEST.MF file:

*org.fusesource.jansi; resolution:=optional; version="[1.9, 2)"*



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list