When memcachedclient is called, a java. Lang. arrayindexoutofboundsexception error is returned.

Source: Internet
Author: User

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)

The reason is that messagedigest instance is not thread-safe. If syncronize is required for multi-threaded calling, this is not the optimal solution. I don't know if there are other solutions.

Write it down first, and then find a solution.

Similar Problem: http://www.javaeye.com/topic/186965

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.