MyException - 我的反常网
当时方位:我的反常网» 软件架构规划 » jedis common 包抵触的有关问题

jedis common 包抵触的有关问题

www.x8vin4.com  网友共享于:2018-06-08  阅读:0次
jedis common 包抵触的问题

现在现状,jedis版本是2.4.2,没有引进common包

报错:

信息: Illegal access: this web application instance has been stopped already.  Could not load redis.clients.jedis.exceptions.JedisDataException.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1813)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
	at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:63)
	at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
	at org.apache.commons.pool2.impl.GenericObjectPool.ensureMinIdle(GenericObjectPool.java:863)
	at org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:1001)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

Exception in thread "commons-pool-EvictionTimer" java.lang.NoClassDefFoundError: redis/clients/jedis/exceptions/JedisDataException
	at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:63)
	at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
	at org.apache.commons.pool2.impl.GenericObjectPool.ensureMinIdle(GenericObjectPool.java:863)
	at org.apache.commons.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:1001)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.exceptions.JedisDataException
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1928)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
	... 6 more

 查了半响,说是jar包抵触

处理办法:

将jedisjar包改成2.9.0

参加如下代码:

<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>${jedis.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-pool2</artifactId>
					<groupId>org.apache.commons</groupId>
				</exclusion>
			</exclusions>
		</dependency>
                 <dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
			<version>2.4.2</version>
		</dependency>

剖析原因:

jedis包中引用了common pool2的jar包

m88 188bet uedbet 威廉希尔 明升 bwin 明升88 bodog bwin 明升m88.com 18luck 188bet unibet unibet Ladbrokes Ladbrokes casino m88明升 明升 明升 m88.com 188bet m88 明陞 uedbet赫塔菲官网 365bet官网 m88 help

文章谈论

软件开发程序过错反常ExceptionCopyright © 2009-2015 MyException 版权所有