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

multimap cache backup fails with "Bucket cannot be cast to class [B"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Hide

      Steps to Reproduce:

      1. Initialize a multimap cache within the Infinispan environment.
      2. Add an entry to the multimap cache.
      3. Utilize the Infinispan CLI to create a backup of the cache

      Expected Behavior: Upon executing the backup creation process with the Infinispan CLI after adding an entry to the multimap cache, the backup should be successfully generated without any errors.

      Actual Behavior: The backup creation process fails to execute, resulting in the absence of the expected backup file.

      Show
      Steps to Reproduce: Initialize a multimap cache within the Infinispan environment. Add an entry to the multimap cache. Utilize the Infinispan CLI to create a backup of the cache Expected Behavior: Upon executing the backup creation process with the Infinispan CLI after adding an entry to the multimap cache, the backup should be successfully generated without any errors. Actual Behavior: The backup creation process fails to execute, resulting in the absence of the expected backup file.
    • Hide

      Create custom backup:

      Iterate of the keyset of the multimap fetch the entrys and write it into a file.

      (The keyset needs to be cloned, otherwise the iterator might fail during the process)

       

      Show
      Create custom backup: Iterate of the keyset of the multimap fetch the entrys and write it into a file. (The keyset needs to be cloned, otherwise the iterator might fail during the process)  

      When using the infinispan cli to create a backup of a multimap cache, the server throws this exception:

      8:58:41,170 INFO  (jgroups-3583,infini21.***.de) [org.infinispan.server.core.backup.BackupManagerImpl] ISPN005043: Starting backup 'Infinispan-20240418085841'
      08:58:41,202 ERROR (non-blocking-thread-infini21.***.de-p2-t40) [org.infinispan.server.core.backup.BackupManagerImpl] ISPN005039: Cannot create cluster backup: java.util.concurrent.CompletionException: java.lang.ClassCastException:class org.infinispan.multimap.impl.Bucket cannot be cast to class [B (org.infinispan.multimap.impl.Bucket is in unnamed module of loader java.net.URLClassLoader @378bf509; [B is in module java.base of loader 'bootstrap')
      at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
      at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
      at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874)
      at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
      at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
      at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
      at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
      at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
      at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
      at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
      at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
      at java.base/java.lang.Thread.run(Thread.java:1583)
      Caused by: java.lang.ClassCastException: class org.infinispan.multimap.impl.Bucket cannot be cast to class [B (org.infinispan.multimap.impl.Bucket is in unnamed module of loader java.net.URLClassLoader @378bf509; [B is in module java.base of loader 'bootstrap')
      at org.infinispan.server.core.backup.resources.CacheResource.lambda$createCacheBackup$5(CacheResource.java:293)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:64)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatUntil$RepeatSubscriber.onNext(FlowableRepeatUntil.java:67)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop(FlowableFlatMap.java:480)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:301)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onNext(FlowableFlatMap.java:627)
      at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onNext(FlowableDoOnLifecycle.java:80)
      at io.reactivex.rxjava3.processors.UnicastProcessor.drainRegular(UnicastProcessor.java:309)
      at io.reactivex.rxjava3.processors.UnicastProcessor.drain(UnicastProcessor.java:384)
      at io.reactivex.rxjava3.processors.UnicastProcessor.subscribeActual(UnicastProcessor.java:486)

       

      Description: When attempting to create a backup using the Infinispan CLI after adding an entry to a multimap cache, the backup creation process fails to execute as expected.

       

       

            Unassigned Unassigned
            stephan.koelle Stephan Kölle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: