com.dyuproject.protostuff.ProtobufException: Protocol message contained an inval

在使用Java源码解析protobuf消息时遇到错误,包括'Protocol message tag had invalid wire type'和'Protocol message contained an invalid tag (zero)'。错误可能由于二进制数据不适合HTTP传输、数据头部错误、字段变动导致的反序列化失败。解决方案涉及数据解压缩、base64解码及检查字段顺序和类型匹配。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.IllegalStateException: Reading from a byte array threw an IOException (should never happen).
	at com.cmall.redis.utils.RedisSeriUtils.deserialize(RedisSeriUtils.java:51)
	at com.cmall.redis.dao.JedisClusterDao.jhget(JedisClusterDao.java:78)
	at com.cmall.redis.service.impl.RedisClusterServiceImpl.hget(RedisClusterServiceImpl.java:49)
	at com.artbulb.redis.BaseJedisApp.main(BaseJedisApp.java:46)
Caused by: java.lang.RuntimeException: Reading from a byte array threw an IOException (should never happen).
	at com.dyuproject.protostuff.IOUtil.mergeFrom(IOUtil.java:52)
	at com.dyuproject.protostuff.ProtostuffIOUtil.mergeFrom(ProtostuffIOUtil.java:96)
	at com.cmall.redis.utils.RedisSeriUtils.deserialize
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值