记使用aliyun-log-logback-appender 报错no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]
依赖:
<dependency>
<groupId>com.aliyun.openservices</groupId>
<artifactId>aliyun-log-logback-appender</artifactId>
<version>0.1.9</version>
<exclusions>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>
配置:
<appender name="loghubAppender" class="com.aliyun.openservices.log.logback.LoghubAppender">
<!-- 其他配置省略**** -->
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>%d{HH:mm:ss.SSS} [%tid] kk-lifeno [%thread] %-5level %logger{35} - %msg %n</pattern>
</layout>
</encoder>
</appender>
错误信息如下:
Exception in thread "main" java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@55:76 - no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@56:108 - no applicable action for [layout], current ElementPath is [[configuration][appender][encoder][layout]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@57:26 - no applicable action for [pattern], current ElementPath is [[configuration][appender][encoder][layout][pattern]]
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:162)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:208)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:74)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:59)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:115)
at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:303)
at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:276)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:212)
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:122)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:175)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:98)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:64)
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:122)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
原因:
0.1.9 版本的aliyun-log-logback-appender jar 中 com.aliyun.openservices.log.logback.LoghubAppender的问题。升级版本 为 0.1.12 或以上即可
记使用aliyun-log-logback-appender 报错no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]的更多相关文章
- Logback报错 no applicable action for [Encoding], current ElementPath is [[configuration][appender][Encoding]]
老版本是0.9,移到springboot项目,解决办法,删除xml配置文件节点<Encoding>UTF-8</Encoding>
- 【异常】ERROR in ch.qos.logback.core.joran.spi.Interpreter@159:22 - no applicable action for [charset], current ElementPath is [[configuration][appender][encoder][charset]]
一.异常信息 Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException at ...
- docker log 批量删除报错: find: `/var/lib/docker/containers/': 没有那个文件或目录
问题描述: 服务器上面docker log太多,打算用之前写的批量清理shell脚本清理掉,但是发现报错. find: `/var/lib/docker/containers/': 没有那个文件或目录 ...
- 【netcore入坑记】 .Net core UseRowNumberForPaging 分页报错 SQL Server 2008 R2 EntityFrameworkCore
异常环境: netcore版本:.Net Core 2.1 efcore版本:Microsoft.EntityFrameworkCore.SqlServer 2.1.1 sql sqlserver 版 ...
- 记一次引用maven插件报错解决方法
1.报错信息如图: plugin org.springframework.boot:spring-boot-maven-plugin not found 2.解决方案: maven的配置文件[sett ...
- 记一次痛苦的Django报错调试经历:
开发的程序在我的本地mac上,ubuntu上,以及树莓派上都成功实现了迁移和运行,但是当准备将运行好好地程序迁移到阿里云的服务器上的mysql数据库上时,出现了非常多的幺蛾子的问题. 具体如下: 初始 ...
- iOS上传App Store报错:this action cannot be completed -22421 解决方案
最近swift项目升了xcode8,提交版本时,遇到这个: this action cannot be completed -22421 瞬间懵逼,连具体报错原因都没有,只有一个代码 22421,找了 ...
- struts2 ,web.xml中配置为/*.action,运行报错Invalid <url-pattern> /*.action in filter mapp
首先,修改成: <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/ ...
- spring 管理事务配置时,结果 报错: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here这个异常
java.lang.IllegalStateException: No Hibernate Session bound to thread, and configuration does not al ...
随机推荐
- IDEA - Debug - not supported in -source 1.5
- 手写代码 - java.util.List 相关
1-ArrayList 访问元素,不能使用ArrayList[0]形式!!!! 必须使用ArrayList.get(0);
- L2-005 集合相似度 (25 分) (STL——set)
链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805070149828608 题目: 给定两个整数集合,它们的相似度 ...
- AI应用开发实战(转)
AI应用开发实战 - 从零开始配置环境 与本篇配套的视频教程请访问:https://www.bilibili.com/video/av24421492/ 建议和反馈,请发送到https://git ...
- 如何使用Linux的Crontab定时执行PHP脚本的方法[转载]
首先说说cron,它是一个linux下的定时执行工具.根用户以外的用户可以使用 crontab 工具来配置 cron 任务.所有用户定义的 crontab 都被保存在/var/spool/cron 目 ...
- LVS节点健康检查及管理脚本
在LVS负载均衡主节点上,模拟keepalived健康检查功能管理LVS节点,当节点挂掉从服务器池中剔除,好了再加到服务器池中来. 工具:yum install -y ipvsadm web03:10 ...
- 高可用Redis(十二):Redis Cluster
Redis Cluster是Redis官方提供的Redis集群功能 1.为什么要实现Redis Cluster 1.主从复制不能实现高可用 2.随着公司发展,用户数量增多,并发越来越多,业务需要更高的 ...
- overlay 文件系统
overlay文件系统浅析 overlayfs文件系统类似于aufs,相比aufs,overlay实现更简洁,很早就合入了linux主线, 合入主线后overlayfs修改为overlay. dock ...
- 生活日历NABCD需求分析
这次我们团队要开发一个生活日历APP,对于这个APP的NABCD的需求分析,我对此作出其中的一小部分介绍. N(Need)需求 目前市场上有很多的日历程序,每个手机自带的功能中必然有日历程序.但是对于 ...
- Hive 2.1.1 学习笔记
1.修改conf下的配置文件cp -a hive-default.xml.template hive-site.xml2.进入bin目录启动hive./hive 报错Exception in thre ...