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(<generated>) ~[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(<generated>) ~[classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberGeneralTask.startGeneralTask(SerialNumberGeneralTask.java:33) [classes/:?]
	at tms.monalisa.service.serialnum.SerialNumberGeneralTask$$FastClassBySpringCGLIB$$e4ff8bc1.invoke(<generated>) [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(<generated>) [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对象为空。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐