redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state .

Spring JIRA | zhouyanming | 7 months ago
  1. 0
  2. 0
  3. 0

    JedisConnection.brPop() executes against the transaction object if in a transaction, then falls through and executes again with the regular client. This results in the following Exception: {code} org.springframework.dao.InvalidDataAccessApiUsageException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.; nested exception is redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead. at org.springframework.data.redis.connection.jedis.JedisUtils.convertJedisAccessException(JedisUtils.java:72) at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:135) at org.springframework.data.redis.connection.jedis.JedisConnection.bRPop(JedisConnection.java:1238) at org.springframework.data.redis.connection.DefaultStringRedisConnection.bRPop(DefaultStringRedisConnection.java:655) at org.springframework.data.redis.connection.AbstractConnectionIntegrationTests.testBRPop(AbstractConnectionIntegrationTests.java:616) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead. at redis.clients.jedis.BinaryJedis.checkIsInMulti(BinaryJedis.java:1659) at redis.clients.jedis.BinaryJedis.brpop(BinaryJedis.java:1990) at org.springframework.data.redis.connection.jedis.JedisConnection.bRPop(JedisConnection.java:1236) ... 32 more {code}

    Spring JIRA | 4 years ago | Jennifer Hickey
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.; nested exception is redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JedisConnection.brPop() executes against the transaction object if in a transaction, then falls through and executes again with the regular client. This results in the following Exception: {code} org.springframework.dao.InvalidDataAccessApiUsageException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.; nested exception is redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead. at org.springframework.data.redis.connection.jedis.JedisUtils.convertJedisAccessException(JedisUtils.java:72) at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:135) at org.springframework.data.redis.connection.jedis.JedisConnection.bRPop(JedisConnection.java:1238) at org.springframework.data.redis.connection.DefaultStringRedisConnection.bRPop(DefaultStringRedisConnection.java:655) at org.springframework.data.redis.connection.AbstractConnectionIntegrationTests.testBRPop(AbstractConnectionIntegrationTests.java:616) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead. at redis.clients.jedis.BinaryJedis.checkIsInMulti(BinaryJedis.java:1659) at redis.clients.jedis.BinaryJedis.brpop(BinaryJedis.java:1990) at org.springframework.data.redis.connection.jedis.JedisConnection.bRPop(JedisConnection.java:1236) ... 32 more {code}

    Spring JIRA | 4 years ago | Jennifer Hickey
    org.springframework.dao.InvalidDataAccessApiUsageException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.; nested exception is redis.clients.jedis.exceptions.JedisDataException: Cannot use Jedis when in Multi. Please use JedisTransaction instead.
  6. 0

    Redis exception with transactions with Jedis client

    Stack Overflow | 3 years ago | Soumya Simanta
    redis.clients.jedis.exceptions.JedisDataException: Please close pipeline or multi block before calling this method.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. redis.clients.jedis.exceptions.JedisDataException

      Cannot use Jedis when in Pipeline. Please use Pipeline or reset jedis state .

      at redis.clients.jedis.BinaryJedis.checkIsInMultiOrPipeline()
    2. Jedis
      BinaryJedis.time
      1. redis.clients.jedis.BinaryJedis.checkIsInMultiOrPipeline(BinaryJedis.java:1671)
      2. redis.clients.jedis.BinaryJedis.time(BinaryJedis.java:3226)
      2 frames
    3. Spring Data Redis
      DefaultStringRedisConnection.time
      1. org.springframework.data.redis.connection.jedis.JedisConnection.time(JedisConnection.java:3184)
      2. org.springframework.data.redis.connection.DefaultStringRedisConnection.time(DefaultStringRedisConnection.java:2365)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    5. Spring Data Redis
      CloseSuppressingInvocationHandler.invoke
      1. org.springframework.data.redis.core.CloseSuppressingInvocationHandler.invoke(CloseSuppressingInvocationHandler.java:57)
      1 frame
    6. com.sun.proxy
      $Proxy142.time
      1. com.sun.proxy.$Proxy142.time(Unknown Source)
      1 frame