MemCachedClient调用,报java.lang.ArrayIndexOutOfBoundsException错误
来源:互联网 发布:淘宝代写客服 编辑:程序博客网 时间:2024/05/22 05:01
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.wonibo.projectx.service.index.ReadPsDaemon.getResult(ReadPsDaemon.java:109)
at com.wonibo.projectx.service.index.ReadPsDaemon.readPs(ReadPsDaemon.java:97)
at com.wonibo.projectx.service.index.ReadPsDaemon.run(ReadPsDaemon.java:54)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at sun.security.provider.DigestBase.engineUpdate(DigestBase.java:110)
at java.security.MessageDigest$Delegate.engineUpdate(MessageDigest.java:537)
at java.security.MessageDigest.update(MessageDigest.java:293)
at com.danga.MemCached.SockIOPool.md5HashingAlg(SockIOPool.java:521)
at com.danga.MemCached.SockIOPool.getHash(SockIOPool.java:547)
at com.danga.MemCached.SockIOPool.getBucket(SockIOPool.java:557)
at com.danga.MemCached.SockIOPool.getSock(SockIOPool.java:918)
at com.danga.MemCached.MemCachedClient.delete(MemCachedClient.java:447)
at com.danga.MemCached.MemCachedClient.delete(MemCachedClient.java:395)
at com.wonibo.projectx.dao.memcache.MemcachedUtil.remove(MemcachedUtil.java:167)
at com.wonibo.projectx.dao.DbManager.getProductBeanStateById(DbManager.java:835)
at com.wonibo.projectx.service.index.ReadPsDaemon$PsReader.call(ReadPsDaemon.java:133)
at com.wonibo.projectx.service.index.ReadPsDaemon$PsReader.call(ReadPsDaemon.java:122)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
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)
原因是MessageDigest instance非线程安全的。如果要多线程调用需要syncronize,这不是最优解决办法,不知有别的解决方法没。
先记下来,以后再找解决方案。
类似问题:http://www.javaeye.com/topic/186965
- MemCachedClient调用,报java.lang.ArrayIndexOutOfBoundsException错误
- [java.lang.arrayindexoutofboundsexception]错误!
- java.lang.ArrayIndexOutOfBoundsException: 0错误
- java split 报错java.lang.ArrayIndexOutOfBoundsException
- Webshpere启动报 java.lang.ArrayIndexOutOfBoundsException 错
- hadoop报错: java.lang.ArrayIndexOutOfBoundsException
- fastjson报java.lang.ArrayIndexOutOfBoundsException: 160
- kylin报错 java.lang.ArrayIndexOutOfBoundsException: -1
- jxl 错误 java.lang.ArrayIndexOutOfBoundsException: 441
- jxl操作java.lang.ArrayIndexOutOfBoundsException: 441 错误
- jxl在linux环境下报java.lang.ArrayIndexOutOfBoundsException
- (数组角标异常)报错java.lang.ArrayIndexOutOfBoundsException..
- Spark On CDH5.6.0 报错java.lang.ArrayIndexOutOfBoundsException: 1
- jsp页面引入jstl标签后台报java.lang.ArrayIndexOutOfBoundsException
- jetty 启动项目报错:java.lang.ArrayIndexOutOfBoundsException: 52264
- jsp页面引入jstl标签后台报java.lang.ArrayIndexOutOfBoundsException
- java.lang.ArrayIndexOutOfBoundsException 翻译
- java.lang.ArrayIndexOutOfBoundsException
- 基于jdom实现xml的schema验证
- 程序员每天该做的事
- 根据字符判断是否需要转码
- Shell与程序的交互:Expect
- C#实现MD5加密,winform c#2005
- MemCachedClient调用,报java.lang.ArrayIndexOutOfBoundsException错误
- [转]修复button在IE中的宽度问题
- WinCE下multi-bin的实现
- C++实现快速排序算法QuickSort()
- Ogre1.7 中大地形
- 基础性创新技术在国内的困境——一个研发者的疑惑
- 在 VMWare 中配置 SQL Server 2005 N + 1 群集 (二) 在Vmware配置虚拟机
- JQuery--点击返回页面顶部
- 关于cannot restore segment prot after reloc: Permission denied 的解决方案