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

Cache backups can't handle x-java-object MediaType with parameters

XMLWordPrintable

      If a x-java-object parameter is used, for example application/x-java-object;type=java.lang.String, then a ClassCastException is thrown:

      io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | org.infinispan.commons.CacheException: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:717)
      	at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:714)
      	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing$UsingSubscriber.onError(FlowableUsing.java:124)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:86)
      	at io.reactivex.rxjava3.internal.subscriptions.EmptySubscription.error(EmptySubscription.java:55)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableError.subscribeActual(FlowableError.java:39)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:106)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onError(BasicFuseableSubscriber.java:101)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.fail(BasicFuseableSubscriber.java:111)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:66)
      	at io.reactivex.rxjava3.internal.util.HalfSerializer.onNext(HalfSerializer.java:45)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapImmediate.innerNext(FlowableConcatMap.java:204)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapInner.onNext(FlowableConcatMap.java:559)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onNext(FlowableDoOnEach.java:92)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.fastPath(FlowableFromIterable.java:185)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request(FlowableFromIterable.java:129)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153)
      	at io.reactivex.rxjava3.internal.subscriptions.SubscriptionArbiter.setSubscription(SubscriptionArbiter.java:99)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapInner.onSubscribe(FlowableConcatMap.java:552)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribe(FlowableFromIterable.java:69)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribeActual(FlowableFromIterable.java:47)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapImmediate.drain(FlowableConcatMap.java:316)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$BaseConcatMapSubscriber.onSubscribe(FlowableConcatMap.java:122)
      	at io.reactivex.rxjava3.internal.jdk8.FlowableFromStream.subscribeStream(FlowableFromStream.java:74)
      	at io.reactivex.rxjava3.internal.jdk8.FlowableFromStream.subscribeActual(FlowableFromStream.java:45)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap.subscribeActual(FlowableConcatMap.java:64)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at org.infinispan.reactive.publisher.impl.LocalPublisherManagerImpl$SegmentAwarePublisherImpl.subscribe(LocalPublisherManagerImpl.java:291)
      	at org.infinispan.reactive.publisher.impl.SegmentAwarePublisher.subscribe(SegmentAwarePublisher.java:34)
      	at org.infinispan.reactive.publisher.impl.SegmentCompletionPublisher.subscribe(SegmentCompletionPublisher.java:34)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDefer.subscribeActual(FlowableDefer.java:42)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext.subscribeActual(FlowableOnErrorNext.java:39)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing.subscribeActual(FlowableUsing.java:73)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15686)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15589)
      	at org.infinispan.server.core.backup.resources.CacheResource.lambda$createCacheBackup$7(CacheResource.java:282)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.infinispan.commons.CacheException: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at org.infinispan.commons.util.Util.rewrapAsCacheException(Util.java:686)
      	at org.infinispan.commons.reactive.RxJavaInterop.lambda$static$2(RxJavaInterop.java:47)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:94)
      	... 54 more
      Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at org.infinispan.server.core.backup.resources.CacheResource.lambda$createCacheBackup$3(CacheResource.java:266)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:64)
      	... 50 more
      Exception in thread "blocking-thread-BackupManagerImplTest-NodeA-p3-t1" io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | org.infinispan.commons.CacheException: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:717)
      	at io.reactivex.rxjava3.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:714)
      	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing$UsingSubscriber.onError(FlowableUsing.java:124)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:86)
      	at io.reactivex.rxjava3.internal.subscriptions.EmptySubscription.error(EmptySubscription.java:55)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableError.subscribeActual(FlowableError.java:39)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:106)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onError(BasicFuseableSubscriber.java:101)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.fail(BasicFuseableSubscriber.java:111)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:66)
      	at io.reactivex.rxjava3.internal.util.HalfSerializer.onNext(HalfSerializer.java:45)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapImmediate.innerNext(FlowableConcatMap.java:204)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapInner.onNext(FlowableConcatMap.java:559)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onNext(FlowableDoOnEach.java:92)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.fastPath(FlowableFromIterable.java:185)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request(FlowableFromIterable.java:129)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153)
      	at io.reactivex.rxjava3.internal.subscriptions.SubscriptionArbiter.setSubscription(SubscriptionArbiter.java:99)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapInner.onSubscribe(FlowableConcatMap.java:552)
      	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribe(FlowableFromIterable.java:69)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribeActual(FlowableFromIterable.java:47)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$ConcatMapImmediate.drain(FlowableConcatMap.java:316)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap$BaseConcatMapSubscriber.onSubscribe(FlowableConcatMap.java:122)
      	at io.reactivex.rxjava3.internal.jdk8.FlowableFromStream.subscribeStream(FlowableFromStream.java:74)
      	at io.reactivex.rxjava3.internal.jdk8.FlowableFromStream.subscribeActual(FlowableFromStream.java:45)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatMap.subscribeActual(FlowableConcatMap.java:64)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at org.infinispan.reactive.publisher.impl.LocalPublisherManagerImpl$SegmentAwarePublisherImpl.subscribe(LocalPublisherManagerImpl.java:291)
      	at org.infinispan.reactive.publisher.impl.SegmentAwarePublisher.subscribe(SegmentAwarePublisher.java:34)
      	at org.infinispan.reactive.publisher.impl.SegmentCompletionPublisher.subscribe(SegmentCompletionPublisher.java:34)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDefer.subscribeActual(FlowableDefer.java:42)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext.subscribeActual(FlowableOnErrorNext.java:39)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach.subscribeActual(FlowableDoOnEach.java:50)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15696)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing.subscribeActual(FlowableUsing.java:73)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15750)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15686)
      	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15589)
      	at org.infinispan.server.core.backup.resources.CacheResource.lambda$createCacheBackup$7(CacheResource.java:282)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.infinispan.commons.CacheException: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at org.infinispan.commons.util.Util.rewrapAsCacheException(Util.java:686)
      	at org.infinispan.commons.reactive.RxJavaInterop.lambda$static$2(RxJavaInterop.java:47)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onError(FlowableOnErrorNext.java:94)
      	... 54 more
      Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')
      	at org.infinispan.server.core.backup.resources.CacheResource.lambda$createCacheBackup$3(CacheResource.java:266)
      	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:64)
      	... 50 more
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: