Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16783

[RESP] Error stacktrace on WRONGTYPE

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 15.1.0.Dev04, 15.0.10.Final
    • RESP
    • None

      Attempt to use a command against incorrect data type correctly detects WRONGTYPE and lets the user know through the API. Nevertheless it generates error stacktrace on the server side with cast class exception as well which seems to be unnecessary and rather confusing suggesting that there is unhandled exception on the server side.

      Redis CLI:

      127.0.0.1:11222> lpush list story
      (integer) 1
      127.0.0.1:11222> SMISMEMBER list story
      (error) WRONGTYPE Operation against a key holding the wrong kind of value
      

      Server log:

      2024-09-26 15:17:53,321 ERROR [o.i.i.i.InvocationContextInterceptor] ISPN000136: Error executing command ReadWriteKeyCommand on Cache 'respCache', writing keys [WrappedByteArray[\l\i\s\t (4 bytes)]] java.lang.ClassCastException: class org.infinispan.multimap.impl.ListBucket cannot be cast to class org.infinispan.multimap.impl.SetBucket (org.infinispan.multimap.impl.ListBucket and org.infinispan.multimap.impl.SetBucket are in unnamed module of loader java.net.URLClassLoader @7adf9f5f)
      	at org.infinispan.multimap.impl.function.set.SMIsMember.apply(SMIsMember.java:39)
      	at org.infinispan.multimap.impl.function.set.SMIsMember.apply(SMIsMember.java:27)
      	at org.infinispan.interceptors.impl.CallInterceptor.visitReadWriteKeyCommand(CallInterceptor.java:1015)
      	at org.infinispan.commands.functional.ReadWriteKeyCommand.acceptVisitor(ReadWriteKeyCommand.java:91)
      	at org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:163)
      
      

              vrigamon@redhat.com Vittorio Rigamonti
              vrigamon@redhat.com Vittorio Rigamonti
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: