Problem description
The Druid connection pool is used in the springboot project. When starting the project, the following error message will be printed in the log, but it will not affect the operation of the program:
com.alibaba.druid.filter.filtermanager: load filter error, filter not found: sl4j </ font>
Problem analysis
Open the Druid jar package, and the filter types supported by Druid are in a Druid filters. Properties
file, as follows:
druid.filters.default=com.alibaba.druid.filter.stat.StatFilter
druid.filters.stat=com.alibaba.druid.filter.stat.StatFilter
druid.filters.mergeStat=com.alibaba.druid.filter.stat.MergeStatFilter
druid.filters.counter=com.alibaba.druid.filter.stat.StatFilter
druid.filters.encoding=com.alibaba.druid.filter.encoding.EncodingConvertFilter
druid.filters.log4j=com.alibaba.druid.filter.logging.Log4jFilter
druid.filters.log4j2=com.alibaba.druid.filter.logging.Log4j2Filter
druid.filters.slf4j=com.alibaba.druid.filter.logging.Slf4jLogFilter
druid.filters.commonlogging=com.alibaba.druid.filter.logging.CommonsLogFilter
druid.filters.commonLogging=com.alibaba.druid.filter.logging.CommonsLogFilter
druid.filters.wall=com.alibaba.druid.wall.WallFilter
druid.filters.config=com.alibaba.druid.filter.config.ConfigFilter
Solution:
Carefully check your profile as follows:
filters: stat,sl4j,wall
It was found that it was a writing error. Slf4j was written as sl4j and an F was missing. Be careful.
Read More:
- Java database Druid error: com.alibaba.druid.pool.DruidDataSource error
- Elasticsearch Startup Error: unable to install syscall filter: java.lang.UnsupportedOperationException: seccomp
- [Solved] shiro Error: SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder“.
- [2022 New Solution] SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder
- springboot sqlserver druid reward: validateConnection false
- [Solved] Failed toString() invocation on an object com.alibaba.fastjson.JSONException: write javaBean error
- [Solved] com.alibaba.fastjson.JSONException: syntax error, pos 1, json
- Configuration of springboot + Druid connection pool
- [Solved] Failed to load class org.slf4j.impl.StaticLoggerBinder
- [Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred
- [Solved] nacos Error: com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance
- ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration…
- Springboot mybatis Integrate Error: Invalid bound statement (not found): com…DepartmentMapper.save
- IDEA Error: lombok.extern.slf4j is not exist [How to Solve]
- DevTools failed to load SourceMap Could not load content [Solved]
- springcloud alibaba Integrating nacos reports errors: create config service error!properties=NacosConfigPropertie
- [Solved] fragment error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}…
- [Solved] Log4j2 log startup error: javax.xml.parsers.ParserConfigurationException…
- Solution to the problem of using Alibaba gateway but unable to route successfully
- Java Running Error: Could not find or load main class