HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • Real Estate
    • U.S. Travel
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

Logstash-logback-encoder 和 logback 出现错误

2020年12月21日 40Browse 0Like 0Comments

获得的错误信息为:

Exception in thread "main" java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.joran.util.PropertySetter@34237b90 - A "net.logstash.logback.encoder.LogstashEncoder" object is not assignable to a "ch.qos.logback.core.Appender" variable.
ERROR in [email protected]34237b90 - The class "ch.qos.logback.core.Appender" was loaded by 
ERROR in [email protected]34237b90 - [[email protected]16f65612] whereas object of type 
ERROR in [email protected]34237b90 - "net.logstash.logback.encoder.LogstashEncoder" was loaded by [[email protected]16f65612].
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:222)
	at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:73)
	at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
	at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
	at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:306)
	at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281)
	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
	at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80)
	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at com.ossez.edtestbank.service.Application.main(Application.java:44)

问题和解决

这个是包的兼容性问题。

logback-core 需要设置为 1.2.0 版本,如果你设置了更高的版本的话,你就会遇到上面的问题。

请参考下面链接中的问题: https://jira.qos.ch/browse/LOGBACK-1326 貌似到现在还没有解决。

 

logback-core-01

 

如果你还希望使用 logstash-logback-encoder 的话,那么需要将 logback 设置为 1.2.0 版本。

https://www.ossez.com/t/logstash-logback-encoder-logback/767

Tags: None
Last updated:2020年12月21日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
Discourse 主题和回复的日期如何查看 Discourse 如何查看主题的查看数量 Confluence 删除的页面会完全删除吗 Confluence 7 删除页面和子页面 DITA 已死 Java 线程暂停的简单代码
AWS S3 使用 travis 编译的时候提示错误 Aws::S3::Errors::PermanentRedirectTravis 编译使用 JDK 的版本GPG 使用 Maven 签名后发送到中央仓库提示 Upload your public key and try the operationPackage 打包上传到中央仓库的时候提示 SCM URL missingMaven Package 如何使用 GPG 签名Node Sass does not 支持的版本错误
导入 Gradle 项目到 IntelliJ IDEA Excel 如何保存文件为 UTF-8 CSV 格式 手动升级 Confluence 6 - 升级 Confluence Hibernate 大数据量问题与性能 Confluence 6 使用 JMX 界面实时监控 https://stackblitz.com/github/cwiki-us-angular/cwiki-us-angular-app 导入后如何添加到自己的项目
Categories
  • Akka
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Real Estate
  • Spring
  • Spring Batch
  • U.S.
  • U.S. Travel
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS