NutzCN Logo
问答 配置shiro+redis实现二级缓存,加上配置后,项目启动失败,请问什么原因
发布于 1489天前 作者 Eli-Hannah 1158 次浏览 复制 上一个帖子 下一个帖子
标签:

增加了2层缓存配置代码后项目启动报错,不增加配置项目正常运行;如下:

# 2层缓存配置
jedisAgent = org nutz.integration.jedis.JedisAgent
cacheManager_ehcache = org.apache.shiro.cache.ehcache.EhCacheManager
cacheManager_ehcache.cacheManagerConfigFile=classpath:ehcache.xml
cacheManager_redis = org.nutz.plugins.cache.impl.redis.RedisCacheManager
cacheManager_redis.mode=kv
cacheManager_redis.debug=true
cacheManager = org.nutz.plugins.cache.impl.lcache.LCacheManager
cacheManager.jedisAgent = $jedisAgent
cacheManager.level1 = $cacheManager_ehcache

注释了:

# cacheManager
#cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager
#cacheManager.cacheManagerConfigFile = classpath:ehcache.xml

启动报错如下:

[2020-11-24 10:27:57,899] Artifact ynqbinfo-web:war exploded: Artifact is being deployed, please wait...
[2020-11-24 10:27:57,900] Artifact yuinfo: Artifact is being deployed, please wait...
24-Nov-2020 10:28:07.619 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.53\webapps\manager
24-Nov-2020 10:28:07.830 信息 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
24-Nov-2020 10:28:07.918 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.53\webapps\manager has finished in 298 ms
24-Nov-2020 10:28:12.761 信息 [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
24-Nov-2020 10:28:14.943 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
24-Nov-2020 10:28:14.944 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2020-11-24 10:28:14,972] Artifact ynqbinfo-web:war exploded: Error during artifact deployment. See server log for details.
24-Nov-2020 10:28:15.115 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2020-11-24 10:28:15,134] Artifact yuinfo: Artifact is deployed successfully
[2020-11-24 10:28:15,135] Artifact yuinfo: Deploy took 17,236 milliseconds
3 回复

丢了?细心点

cacheManager.level2 = $cacheManager_redis

@Wizzercn 配置文件里面也是有的,复制的时候复制漏了。

nutz-integration-jedis
nutz-plugins-cache
都引入了么?

添加回复
请先登陆
回到顶部