栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

ERR wrong number of arguments for ‘lpush‘ command

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ERR wrong number of arguments for ‘lpush‘ command

org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for 'lpush' command; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'lpush' command
	at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:64) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:242) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.connection.jedis.JedisConnection.lPush(JedisConnection.java:1702) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.DefaultListOperations$5.doInRedis(DefaultListOperations.java:85) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.DefaultListOperations$5.doInRedis(DefaultListOperations.java:83) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at org.springframework.data.redis.core.DefaultListOperations.leftPushAll(DefaultListOperations.java:83) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	at dkcp.utils.redis.RedisUtil.lPush(RedisUtil.java:641) ~[classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberRecordService.produceNumbers(SerialNumberRecordService.java:100) ~[classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberRecordService.produceNumbers(SerialNumberRecordService.java:79) ~[classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberRecordService$$FastClassBySpringCGLIB$$3312b558.invoke() ~[classes/:?]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at dkcp.web.filter.ServiceParamFilter.interceptor(ServiceParamFilter.java:100) ~[classes/:?]
	at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_271]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) ~[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at tms.monalisa.service.serialnum.SerialNumberRecordService$$EnhancerBySpringCGLIB$$5fa0146e.produceNumbers() ~[classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberGeneralTask.startGeneralTask(SerialNumberGeneralTask.java:33) [classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberGeneralTask$$FastClassBySpringCGLIB$$e4ff8bc1.invoke() [classes/:?]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at dkcp.web.filter.ServiceParamFilter.interceptor(ServiceParamFilter.java:100) [classes/:?]
	at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_271]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) [spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at tms.monalisa.service.serialnum.SerialNumberGeneralTask$$EnhancerBySpringCGLIB$$17e76149.startGeneralTask() [classes/:?]
	at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_271]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_271]
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_271]
	at java.util.concurrent.FutureTask.runAndReset$$$capture(FutureTask.java:308) [?:1.8.0_271]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java) [?:1.8.0_271]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_271]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_271]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_271]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_271]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'lpush' command
	at redis.clients.jedis.Protocol.processError(Protocol.java:127) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Protocol.process(Protocol.java:161) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Connection.getIntegerReply(Connection.java:265) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.BinaryJedis.lpush(BinaryJedis.java:1071) ~[jedis-2.9.0.jar:?]
	at org.springframework.data.redis.connection.jedis.JedisConnection.lPush(JedisConnection.java:1700) ~[spring-data-redis-1.8.6.RELEASE.jar:?]
	... 57 more

 

报错原因:'lpush'命令的参数数目错误

最近项目后台一直报redis的ERR wrong number of arguments for 'lpush' command,后来调试发现是因为传的serialNumberList对象为空。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/302074.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号