hmset命令报错 value sent to redis cannot be null
来源:互联网 发布:java log4j2.xml 编辑:程序博客网 时间:2024/06/05 19:55
redis存入hash结构时, key, hkey, hvalue 均不能为null
public void hmset(final String key, final Map<String, String> hash) { final Map<byte[], byte[]> bhash = new HashMap<byte[], byte[]>(hash.size()); for (final Entry<String, String> entry : hash.entrySet()) { bhash.put(SafeEncoder.encode(entry.getKey()), SafeEncoder.encode(entry.getValue())); } hmset(SafeEncoder.encode(key), bhash); }
public static byte[] encode(final String str) { try { if (str == null) { throw new JedisDataException("value sent to redis cannot be null"); } return str.getBytes(Protocol.CHARSET); } catch (UnsupportedEncodingException e) { throw new JedisException(e); } }
阅读全文
0 0
- hmset命令报错 value sent to redis cannot be null
- C#SSH.NET连接报错"value cannot be null All lists either null or empty"
- php查询SqlServer报错问题ntext data cannot be sent to clients using DB-Library
- Default value for column cannot be changed to NULL
- ASP.NET报错——Master Page frameworkName: Value cannot be null error
- 【报错】MySQLIntegrityConstraintViolationException:Column cannot be null
- 2014.03.03 hibernate使用报错 node to traverse cannot be null!
- SSH框架问题——node to traverse cannot be null!报错问题
- 执行hibernate报错“node to traverse cannot be null”问题的解决
- 异常信息篇-hibernate报错:node to traverse cannot be null
- 执行hibernate报错“node to traverse cannot be null”问题的解决
- My Eclipse:Resources cannot be null报错
- hibernate报错:Column 'id' cannot be null
- linq insert The null value cannot be assigned to a member with type System.Int64 which is a non-null
- node to traverse cannot be null!
- node to traverse cannot be null
- node to traverse cannot be null
- node to traverse cannot be null
- tensorflow学习——parser变量定义
- Android函数响应式编程最新RxJava-线程控制
- HTML DOM(document object model文档对象模型)
- 查看laravel使用的版本
- ios App Store 审核指南官方中文版
- hmset命令报错 value sent to redis cannot be null
- 转型技术管理后,应该避踩哪些坑?
- leetcode 102. Binary Tree Level Order Traversal BFS广度优先遍历
- java实现服务器下载到本地
- 理解为何是用iPolyGon赋值给polygon,而不是ipPointCol
- 题目91:阶乘之和
- asp.net 中 foreach 语法
- Maven集成MybatisGenarator逆向工程
- 17. Letter Combinations of a Phone Number 组合、回溯