nfhu / xmemcached

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

Web服务器重启的时候总报一些xmemcached客户端的错 #281

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
如题:
Exception in thread "xmemcached-read-thread-2-thread-97" 
java.lang.NoClassDefFoundError: com/google/code/yanf4j/util/SelectorFactory
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.flush0(AbstractNioSession.java:266)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.closeChannel(NioTCPSession.java:323)
        at com.google.code.yanf4j.core.impl.AbstractSession.close(AbstractSession.java:286)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.readFromBuffer(NioTCPSession.java:230)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onRead(AbstractNioSession.java:196)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:341)
        at com.google.code.yanf4j.nio.impl.SocketChannelController.dispatchReadEvent(SocketChannelController.java:56)
        at com.google.code.yanf4j.nio.impl.NioController$ReadTask.run(NioController.java:110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "xmemcached-read-thread-2-thread-98" 
java.lang.NoClassDefFoundError: com/google/code/yanf4j/util/SelectorFactory
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.flush0(AbstractNioSession.java:266)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.closeChannel(NioTCPSession.java:323)
        at com.google.code.yanf4j.core.impl.AbstractSession.close(AbstractSession.java:286)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.readFromBuffer(NioTCPSession.java:230)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onRead(AbstractNioSession.java:196)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:341)
        at com.google.code.yanf4j.nio.impl.SocketChannelController.dispatchReadEvent(SocketChannelController.java:56)
        at com.google.code.yanf4j.nio.impl.NioController$ReadTask.run(NioController.java:110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "xmemcached-read-thread-2-thread-99" 
java.lang.NoClassDefFoundError: com/google/code/yanf4j/util/SelectorFactory
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.flush0(AbstractNioSession.java:266)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.closeChannel(NioTCPSession.java:323)
        at com.google.code.yanf4j.core.impl.AbstractSession.close(AbstractSession.java:286)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.readFromBuffer(NioTCPSession.java:230)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onRead(AbstractNioSession.java:196)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:341)
        at com.google.code.yanf4j.nio.impl.SocketChannelController.dispatchReadEvent(SocketChannelController.java:56)
        at com.google.code.yanf4j.nio.impl.NioController$ReadTask.run(NioController.java:110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)

每次重启tomcat都会报一堆xmemcached客户端的错,改怎么解决呢

Original issue reported on code.google.com by gzy...@gmail.com on 22 Jan 2014 at 7:00

GoogleCodeExporter commented 9 years ago
Hi, I downloaded the source code and I think I have found the problem. 
It seems that the SelectorFactory class has been unloaded for some reason. 

After checking the implementation for SelectorFactory, it is not guaranteed 
that the SelectorFactory class has been loaded, so a Singleton implementation 
with eager instantiation should avoid the problem. 

Original comment by angel.as...@idealo.de on 15 May 2014 at 7:49