错误原因:

因为redis中已经存在了相同的key, 而且key对应的值类型并不是Set,而是SortSet(改动前);再调用smembers时,抛出此错误。

解决方法:

将原来的的key给Del掉,再从新执行代码,没有问题。

redis.clients.jedis.exceptions.JedisDataException: WRONGTYPE Operation against a key holding the wrong kind of value的更多相关文章

  1. Caused by: redis.clients.jedis.exceptions.JedisDataException: WRONGTYPE Operation against a key holding the wrong kind of value

    对错误类型key的操作,也就是说redis中没有你当前操作的这个key,而你用这个key去执行某些操作!检查key是否正确

  2. redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set

    使用哨兵模式连接redis连接池时,遇到错误: Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sen ...

  3. ERR Unsupported CONFIG parameter: notify-keyspace-events; nested exception is redis.clients.jedis.exceptions.JedisDataException

    异常信息 时间:2017-04-05 15:53:57,361 - 级别:[ WARN] - 消息: [other] The web application [ROOT] appears to hav ...

  4. redis.clients.jedis.exceptions.JedisDataException: ERR invalid DB index

    添加redis配置文件, 启动后,调用报错  redis.clients.jedis.exceptions.JedisDataException: ERR invalid DB index ERR i ...

  5. redis.clients.jedis.exceptions.JedisDataException :READONLY You can't write

    分布式直连同步调用测试时出现的错误:主从复制架构下,默认Slave是只读的,如果写入则会报错: redis.clients.jedis.exceptions.JedisDataException: R ...

  6. 【问题集】redis.clients.jedis.exceptions.JedisDataException: ERR value is not an integer or out of range

    redis.clients.jedis.exceptions.JedisDataException: ERR value is not an integer or out of range incrm ...

  7. 【异常】redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'PSETEX'

    在spring中 针对 RedisTemplate类: private RedisTemplate<String, String> template; 当调用下面方法 template.o ...

  8. redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots

    最近在学习Redis ,在写test测试的时候碰到这个报错: redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is c ...

  9. Caused by: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write against a read only slave.

    Caused by: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write against a rea ...

随机推荐

  1. 在ASP.NET Web API和ASP.NET Web MVC中使用Ninject

    先附上源码下载地址 一.准备工作 1.新建一个名为MvcDemo的空解决方案 2.新建一个名为MvcDemo.WebUI的空MVC应用程序 3.使用NuGet安装Ninject库   二.在ASP.N ...

  2. 富文本是在modal框中弹出显示的问题

    记录一下,在用tinymce富文本的时候,由于是用在modal 上的,始终无法获取焦点,后来才发现问题出在tinymce在modal前创建了,所以导致这个问题,解决方案就是用 v-if="v ...

  3. Bootstrap入门八:图片

    1.响应式图片 在 Bootstrap 版本 3 中,通过为图片添加 .img-responsive 类可以让图片支持响应式布局.其实质是为图片设置了 max-width: 100%;. height ...

  4. 接口调用 POST

    /** * 接口调用 POST * @return [type] [description] */ public function portPhone(Request $request) { $pho ...

  5. 【SQL】178. Rank Scores

    Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ra ...

  6. getJSON获取JSON文件加载下拉框及动态验证比输入项

    1.html界面 <form action="" method="get"> <div class="form-group" ...

  7. thinkphp的_STORAGE_WRITE_ERROR_问题

    今天服务器突然报这个问题(上图所示),在thinkphp的官网上也发现有朋友碰到这个问题,定位到应该是Runtime目录没有写权限,然后试着给Application下的Runtime目录 chmod ...

  8. noi 2727:仙岛求药

    2727:仙岛求药 总时间限制: 1000ms 内存限制: 65536kB 描述 少年李逍遥的婶婶病了,王小虎介绍他去一趟仙灵岛,向仙女姐姐要仙丹救婶婶.叛逆但孝顺的李逍遥闯进了仙灵岛,克服了千险万难 ...

  9. 【推导】zoj3846 GCD Reduce

    题意:给你n个正整数a1...an,一次操作是选择任意两个数ai,aj,将它们都替换成gcd(ai,aj).让你在5n步内将所有数变为1.或者输出不可能. 如果所有数的gcd不为1,显然不可能. 否则 ...

  10. [IOI2007]Miners

    [IOI2007]Miners 题目大意: 两个人吃东西,总共有\(3\)种食物,每个人每次吃到食物时可以获得的收益是当前食物和前两次吃的食物中,不同食物的种数.现在给定一个长度为\(n(n\le10 ...