Redis Wrongtype Operation against a key holding the wrong kind of Value__redis

Source: Internet
Author: User
Tags aop redis
2018-04-27 15:01:50.141| error| evmessagelistener|
Receive msgid:ac110006000d30f39991868baa7bbf6b tag:1 Status:reconsumelater Redis.clients.jedis.exceptions.JedisDataException:WRONGTYPE Operation against a key holding the wrong kind of value at R Edis.clients.jedis.Protocol.processError (protocol.java:117) at Redis.clients.jedis.Protocol.process ( protocol.java:151) at Redis.clients.jedis.Protocol.read (protocol.java:205) at Redis.clients.jedis.Connection.readProtocolWithCheckingBroken (connection.java:297) at Redis.clients.jedis.Connection.getIntegerReply (connection.java:222) at Redis.clients.jedis.Jedis.hset (Jedis.java : 606) at Com.extracme.evready.busi.service.ServiceMessage.updateStakeRedisInfo (servicemessage.java:233) at Com.extracme.evready.busi.service.ServiceMessage.handerMessage (servicemessage.java:139) at com.extracme.evready.busi.service.servicemessage$ $FastClassBySpringCGLIB $$63c3ab5e.invoke (<generated>) at Org.springframework.cglib.proxy.MethodProxy.invoke (Methodproxy.java:204) at Org.springframework.aop.framework.cglibaopproxy$cglibmethodinvocation.invokejoinpoint ( cglibaopproxy.java:720) at Org.springframework.aop.framework.ReflectiveMethodInvocation.proceed ( reflectivemethodinvocation.java:157) at org.springframework.transaction.interceptor.transactioninterceptor$1. Proceedwithinvocation (transactioninterceptor.java:99) at Org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction (
 transactionaspectsupport.java:281) ^c at org.springframework.transaction.interceptor.t
/**
		 * 2: Control mode-the effective time of automatic compensation mechanism state
		 /
		String key_expire = Rediscarportcloumn.mode_expire_prefix + Result.getgridstakeseq ();		Jedis.hset (Key_expire,commonconstant.send_times_key, commonconstant.send_stake_msg_times)//limiting the number of active issuance
		Jedis.hset (Key_expire, "Send_times", "3");//Limit the number
of active issuance//		Jediscluster.hset (Key_expire, Commonconstant.send_times_key, commonconstant.send_stake_msg_times);//limiting the frequency of active issuance
		}
		jedis.close ();

Hset doesn't look like the wrong value type. It turns out that the same key already exists in the Redis database, and that the value type of the key is not hashkey, and this error is thrown when you call Hset. PS: Suddenly think up, initially set the Key-val, back to Hash-val)

Clean out the original data and run it again.

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.