开发者社区> 问答> 正文

memcached session共享问题?报错


Tomcat中的cantext.xml配置如下

<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"  

    memcachedNodes="n1:127.0.0.1:11211"  
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"  
sessionBackupAsync="false"     
    sessionBackupTimeout="100" 
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory" 
customConverter="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"

copyCollectionsForSerialization="false"/>

相关jar如下


报错如下,老是报这个错误

java.lang.NoSuchMethodError: de.javakaffee.web.msm.MemcachedSessionService.setMemcachedClient(Lnet/spy/memcached/MemcachedClient;)V
at de.javakaffee.web.msm.MemcachedBackupSessionManager.startInternal(MemcachedBackupSessionManager.java:127)
at de.javakaffee.web.msm.MemcachedBackupSessionManager.start(MemcachedBackupSessionManager.java:637)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4718)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)


九月 23, 2015 4:40:12 下午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory classes
九月 23, 2015 4:40:12 下午 org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory classes
java.lang.NoSuchMethodError: de.javakaffee.web.msm.MemcachedSessionService.setMemcachedClient(Lnet/spy/memcached/MemcachedClient;)V
at de.javakaffee.web.msm.MemcachedBackupSessionManager.startInternal(MemcachedBackupSessionManager.java:127)
at de.javakaffee.web.msm.MemcachedBackupSessionManager.start(MemcachedBackupSessionManager.java:637)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4718)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.sta


展开
收起
爱吃鱼的程序员 2020-06-12 11:02:21 545 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    方法找不到

    版本的问题?

    试试这个:" clusterTomcat6.xandTomcat7.x,useredisstoresession",https://github.com/wjw465150/RedisManager

    引用来自“whaon”的评论

    方法找不到

    版本的问题?

    引用来自“白石”的评论

    试试这个:" clusterTomcat6.xandTomcat7.x,useredisstoresession",https://github.com/wjw465150/RedisManager
    2020-06-12 11:02:39
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
高并发分布式缓存Redis6.0 立即下载
阿里云Redis——读写分离 立即下载
阿里云Redis-读写分离 立即下载