ahww520 / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

ApplicationServer can not restart carsed by Exception in thread "Xmemcached-Reactor-2" java.lang.NullPointerException #253

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
我的邮箱:zhuchunlai206@qq.com

What steps will reproduce the problem?
1.执行redploy或者shutdown操作时,发现应用服务器无法停止,进
程依旧存在.

What version of the product are you using? On what operating system?
1、xmemcached 1.4.1
2、Tomcat 6.0.36
3、OS:Window 7 32bit
4、Memcache 1.2.6
5、扩展了Spring 
cache,从而支持采用memcache做缓存实现,使用@cachable注解

以下是详细的错误信息:

"D:\Program Files\tomcat-6.0.36\bin\catalina.bat" stop
Using CATALINA_BASE:   
"C:\Users\Administrator\.IntelliJIdea12\system\tomcat\Tomcat_6_0_odp-openapi"
Using CATALINA_HOME:   "D:\Program Files\tomcat-6.0.36"
Using CATALINA_TMPDIR: "D:\Program Files\tomcat-6.0.36\temp"
Using JRE_HOME:        "D:\Program Files\Java\jdk1.6.0_35"
Using CLASSPATH:       "D:\Program Files\tomcat-6.0.36\bin\bootstrap.jar"
2013-5-24 16:08:05 org.apache.coyote.http11.Http11AprProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2013-5-24 16:08:05 org.apache.coyote.ajp.AjpAprProtocol pause
信息: Pausing Coyote AJP/1.3 on ajp-8009
2013-5-24 16:08:06 org.apache.catalina.core.StandardService stop
信息: Stopping service Catalina
[2013-05-24 16:08:06] [INFO ] Closing WebApplicationContext for namespace 
'openapi-servlet': startup date [Fri May 24 16:07:22 CST 2013]; parent: Root 
WebApplicationContext - 
[org.springframework.context.support.AbstractApplicationContext.doClose(Abstract
ApplicationContext.java:1020)]     
[2013-05-24 16:08:06] [INFO ] Destroying singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@d19cdf: 
defining beans 
[openAPIController,org.springframework.context.annotation.internalConfigurationA
nnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnot
ationProcessor,org.springframework.context.annotation.internalRequiredAnnotation
Processor,org.springframework.context.annotation.internalCommonAnnotationProcess
or,com.jd.bi.odp.openapi.support.BeanFactory#0,org.springframework.context.annot
ation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@146b6db - 
[org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyS
ingletons(DefaultSingletonBeanRegistry.java:433)]     
[2013-05-24 16:08:06] [INFO ] Closing Root WebApplicationContext: startup date 
[Fri May 24 16:07:21 CST 2013]; root of context hierarchy - 
[org.springframework.context.support.AbstractApplicationContext.doClose(Abstract
ApplicationContext.java:1020)]     
[2013-05-24 16:08:06] [INFO ] Destroying singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@146b6db: 
defining beans 
[org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0
,dispatcher,processor,authValidator,indicatorValidator,parameterValidator,signVa
lidator,statisticalTimeValidator,typeValidator,validatorProxy,adPromotionHandler
,adPromotionValidator,adServiingHandler,categoryPromotionHandler,itemPromotionHa
ndler,itemPromotionValidator,stVenderHandler,stWebMasterHandler,keyGenerator,org
.springframework.context.annotation.internalConfigurationAnnotationProcessor,org
.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.spr
ingframework.context.annotation.internalRequiredAnnotationProcessor,org.springfr
amework.context.annotation.internalCommonAnnotationProcessor,org.springframework
.aop.config.internalAutoProxyCreator,org.springframework.cache.annotation.Annota
tionCacheOperationSource#0,org.springframework.cache.interceptor.CacheIntercepto
r#0,org.springframework.cache.config.internalCacheAdvisor,memcachedClientBuilder
,cacheManager,xMemcachedClient,ngCacheManager,org.springframework.context.annota
tion.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of 
factory hierarchy - 
[org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyS
ingletons(DefaultSingletonBeanRegistry.java:433)]     
2013-5-24 16:08:06 org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
严重: The web application [] appears to have started a thread named 
[http-8080-2-SendThread(vmdev40:2181)] but has failed to stop it. This is very 
likely to create a memory leak.
2013-5-24 16:08:06 org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
严重: The web application [] appears to have started a thread named 
[http-8080-2-EventThread] but has failed to stop it. This is very likely to 
create a memory leak.
2013-5-24 16:08:06 org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
严重: The web application [] appears to have started a thread named 
[hbase-table-pool1-thread-1] but has failed to stop it. This is very likely to 
create a memory leak.
2013-5-24 16:08:06 org.apache.catalina.loader.WebappClassLoader 
checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type 
[org.apache.hadoop.io.Text$1] (value [org.apache.hadoop.io.Text$1@9c87c1]) and 
a value of type [sun.nio.cs.UTF_8.Encoder] (value 
[sun.nio.cs.UTF_8$Encoder@94b318]) but failed to remove it when the web 
application was stopped. This is very likely to create a memory leak.
2013-5-24 16:08:06 org.apache.catalina.loader.WebappClassLoader 
checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type 
[org.apache.hadoop.io.Text$1] (value [org.apache.hadoop.io.Text$1@9c87c1]) and 
a value of type [sun.nio.cs.UTF_8.Encoder] (value 
[sun.nio.cs.UTF_8$Encoder@79ecf4]) but failed to remove it when the web 
application was stopped. This is very likely to create a memory leak.
2013-5-24 16:08:06 org.apache.coyote.http11.Http11AprProtocol destroy
信息: Stopping Coyote HTTP/1.1 on http-8080
2013-5-24 16:08:06 org.apache.coyote.ajp.AjpAprProtocol destroy
信息: Stopping Coyote AJP/1.3 on ajp-8009
Exception in thread "Xmemcached-Reactor-2" java.lang.NullPointerException
    at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:575)
    at net.rubyeye.xmemcached.impl.MemcachedHandler.onExceptionCaught(MemcachedHandler.java:138)
    at com.google.code.yanf4j.core.impl.AbstractSession.onException(AbstractSession.java:300)
    at com.google.code.yanf4j.core.impl.AbstractSession.onIdle(AbstractSession.java:196)
    at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:350)
    at com.google.code.yanf4j.nio.impl.Reactor.checkIdle(Reactor.java:473)
    at com.google.code.yanf4j.nio.impl.Reactor.checkExpiredIdle(Reactor.java:464)
    at com.google.code.yanf4j.nio.impl.Reactor.checkSessionTimeout(Reactor.java:364)
    at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:121)
Exception in thread "Xmemcached-Reactor-3" java.lang.NullPointerException
    at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:575)
    at net.rubyeye.xmemcached.impl.MemcachedHandler.onExceptionCaught(MemcachedHandler.java:138)
    at com.google.code.yanf4j.core.impl.AbstractSession.onException(AbstractSession.java:300)
    at com.google.code.yanf4j.core.impl.AbstractSession.onIdle(AbstractSession.java:196)
    at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:350)
    at com.google.code.yanf4j.nio.impl.Reactor.checkIdle(Reactor.java:473)
    at com.google.code.yanf4j.nio.impl.Reactor.checkExpiredIdle(Reactor.java:464)
    at com.google.code.yanf4j.nio.impl.Reactor.checkSessionTimeout(Reactor.java:364)
    at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:121)
Exception in thread "Xmemcached-Reactor-1" java.lang.NullPointerException
    at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:575)
    at net.rubyeye.xmemcached.impl.MemcachedHandler.onExceptionCaught(MemcachedHandler.java:138)
    at com.google.code.yanf4j.core.impl.AbstractSession.onException(AbstractSession.java:300)
    at com.google.code.yanf4j.core.impl.AbstractSession.onIdle(AbstractSession.java:196)
    at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:350)
    at com.google.code.yanf4j.nio.impl.Reactor.checkIdle(Reactor.java:473)
    at com.google.code.yanf4j.nio.impl.Reactor.checkExpiredIdle(Reactor.java:464)
    at com.google.code.yanf4j.nio.impl.Reactor.checkSessionTimeout(Reactor.java:364)
    at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:121)

Original issue reported on code.google.com by zhuchunl...@gmail.com on 24 May 2013 at 8:24

GoogleCodeExporter commented 8 years ago
从日志看,用了springframework。在关于MemcachedClient的bean销毁时�
��者spring的容器关闭时,执行一下MemcachedClient的shutdown,即可�
��免这个异常的抛出。

Original comment by colins...@gmail.com on 17 Jul 2013 at 6:39

GoogleCodeExporter commented 8 years ago
1.4.2 
released,将reactor设置为daemon线程,应该不会出现这个问题了��
�

Original comment by killme2...@gmail.com on 19 Jul 2013 at 6:41