redis.clients.jedis.exceptions.JedisDataException......attempt to compare nil with number

八月 03, 2020 6:15:54 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [doseckill] in context with path [/Seckill] threw exception
redis.clients.jedis.exceptions.JedisDataException: ERR Error running script (call to f_83236acb1751b8026fe5361015881ce04f73347d): @user_script:10: user_script:10: attempt to compare nil with number 

 

模拟秒杀,报错。

原因:没有给产品添加库存

 

解决办法:在redis中添加库存

192.168.108.128:6379> set Seckill:0101:kc 10
OK
 

 

你可能感兴趣的:(异常)