使用redis问题

使用redis时。报错了,求解:

行100 RedisPlugin wxregRedis = new RedisPlugin("wxreg", "127.0.0.1");
行101 me.add(wxregRedis);

严重: Exception starting filter jfinal
java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
	at com.config.GrabTreasureConfig.configPlugin(GrabTreasureConfig.java:101)
	at com.jfinal.core.Config.configPluginWithOrder(Config.java:70)
	at com.jfinal.core.Config.configJFinal(Config.java:56)
	at com.jfinal.core.JFinal.init(JFinal.java:63)
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4981)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5683)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1702)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1692)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.GenericObjectPoolConfig
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1928)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
	... 17 more


评论区

PopYwx

2018-05-28 21:37

行号写错了。第一个是既是:行101 ;第二个既是行102

PopYwx

2018-05-28 21:53

已经解决了,需要 导入一下jar包:jedis-2.7.2.jar+commons-pool2-2.3.jar+fst-2.29.jar

热门反馈

扫码入社