我是靠谱客的博主 敏感宝马,最近开发中收集的这篇文章主要介绍Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'hse,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

报错:

Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'hset' command
    at redis.clients.jedis.Protocol.processError(Protocol.java:66)
    at redis.clients.jedis.Protocol.process(Protocol.java:73)
    at redis.clients.jedis.Protocol.read(Protocol.java:138)
    at redis.clients.jedis.Connection.getIntegerReply(Connection.java:191)
    at redis.clients.jedis.Jedis.zrem(Jedis.java:1440)
    at com.gamejelly.gong.global.dbs.service.GlobalJedisService$26.doInJedis(GlobalJedisService.java:750)
    at com.hadoit.game.common.framework.nosql.redis.JedisTemplate.execute(JedisTemplate.java:79)
    at com.gamejelly.gong.global.dbs.service.GlobalJedisService.delRedisKeys(GlobalJedisService.java:746)
    at com.gamejelly.gong.global.dbs.proxy.GlobalCommandProxy.delRedisKeys(GlobalCommandProxy.java:642)
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.hadoit.game.engine.core.utils.method.MethodInvoationWrap.invoke(MethodInvoationWrap.java:63)

原因:

jedis.hset(key, map) 数组参数delkeys长度为0,即抛出该异常

扩展:
网上查到jedis还有很多方法都会抛出该异常,原因与此一致。jedis 不定长度参数方法都有这个问题,大家要注意一下~

最后

以上就是敏感宝马为你收集整理的Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'hse的全部内容,希望文章能够帮你解决Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'hse所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(94)

评论列表共有 0 条评论

立即
投稿
返回
顶部