NutzCN Logo
问答 jedisPool without define
发布于 2454天前 作者 threefish 1872 次浏览 复制 上一个帖子 下一个帖子
标签:

一直报错,请问如何解决?

org.nutz.ioc.ObjectLoadException: Object 'jedisPool' without define!
	org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:157)
	org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
	org.nutz.ioc.impl.NutIoc.get(NutIoc.java:270)
	org.nutz.integration.jedis.JedisAgent.getJedisPool(JedisAgent.java:60)
	org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49)
	org.nutz.plugins.cache.impl.lcache.LCacheManager.jedis(LCacheManager.java:52)
	org.nutz.plugins.cache.impl.redis.RedisCache2.get(RedisCache2.java:33)
	org.nutz.plugins.cache.impl.lcache.LCache.get(LCache.java:34)
	org.apache.shiro.session.mgt.eis.CachingSessionDAO.getCachedSession(CachingSessionDAO.java:217)
	org.apache.shiro.session.mgt.eis.CachingSessionDAO.getCachedSession(CachingSessionDAO.java:202)
	org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:259)
	org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236)
	org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222)
	org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118)
	org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108)
	org.apache.shiro.session.mgt.AbstractNativeSessionManager.getSession(AbstractNativeSessionManager.java:100)
	org.apache.shiro.mgt.SessionsSecurityManager.getSession(SessionsSecurityManager.java:125)
	org.apache.shiro.mgt.DefaultSecurityManager.resolveContextSession(DefaultSecurityManager.java:456)
	org.apache.shiro.mgt.DefaultSecurityManager.resolveSession(DefaultSecurityManager.java:442)
	org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:338)
	org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:846)
	org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:148)
	org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:292)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:359)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
7 回复

没加jedis插件吧?

 <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz-plugins-cache</artifactId>
            <version>1.r.65</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz-integration-jedis</artifactId>
          <version>1.r.65</version>
        </dependency>

还需什么吗?

redis.properties

redis.enable=true
redis.host=127.0.0.1
redis.port=6379
redis.timeout=2000
#redis.password=
redis.database=0

@IocBy改了吗?

args里面的末尾加一个 "*jedis"

没有,就是缺了这个 "*jedis"

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