安装EhCachePlugin时,jar包重复冲突,不知道跟哪个jar包重复了?

JFinal提供的三个jar包:

blob.png


我的项目中所有的jar包:

blob.png


引入slf4j的jar包以后,抛出异常:

Starting JFinal 2.2
Starting scanner at interval of 5 seconds.
Starting web server on port: 80
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

2017-01-18 08:41:53
[WARN]-[Thread: main]-[net.sf.ehcache.config.ConfigurationFactory.parseConfiguration()]: No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/ehcache-core-2.5.2.jar!/ehcache-failsafe.xml
Starting Complete. Welcome To The JFinal World :)


评论区

nbjgl

2017-01-18 08:55

异常代码没显示完整,完整代码:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

2017-01-18 08:41:53
[WARN]-[Thread: main]-[net.sf.ehcache.config.ConfigurationFactory.parseConfiguration()]: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/ehcache-core-2.5.2.jar!/ehcache-failsafe.xml

软件攻城狮

2017-01-18 09:04

你把jar包换一下试试看。
slf4j-api-1.7.21
slf4j-log4j12-1.7.21

nbjgl

2017-01-18 09:21

可以了,但是还有一个小异常:

[WARN]-[Thread: main]-[net.sf.ehcache.config.ConfigurationFactory.parseConfiguration()]: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/D:/Workspaces/MyEclipse%2010/API/WebRoot/WEB-INF/lib/ehcache-core-2.5.2.jar!/ehcache-failsafe.xml

这是什么?

软件攻城狮

2017-01-18 09:33

缺少ehcache-failsafe.xml配置文件

nbjgl

2017-01-18 10:02

这个是干嘛的?在哪里配置啊?怎么配置呢?

软件攻城狮

2017-01-18 10:35

根路径放ehcache.xml
自己百度一下,ehcache.xml配置详解

杜福忠

2017-01-18 23:04

传送门:http://www.jfinal.com/share/73 海哥精辟详解

热门反馈

扫码入社