eventuate-tram/eventuate-tram-core

java.lang.IncompatibleClassChangeError: org/reactivestreams/Subscriber.onComplete()V _ at dev.miku.r2dbc.mysql.MySqlResult$$Lambda$428/00000000FED3FD70.run(Unknown Source) ~[na:na]

cer opened this issue · 4 comments

cer commented

This tests ./eventuate-tram-spring-reactive-consumer-jdbc/src/test/java/io/eventuate/tram/spring/reactive/consumer/jdbc/EventuateSpringReactiveSqlTableBasedDuplicateMessageDetectorTest.java hangs indefinitely (see #166)


���Ujava.lang.IncompatibleClassChangeError: org/reactivestreams/Subscriber.onComplete()V
���_	at dev.miku.r2dbc.mysql.MySqlResult$$Lambda$428/00000000FED3FD70.run(Unknown Source) ~[na:na]
���r	at reactor.core.publisher.LambdaSubscriber.onComplete(LambdaSubscriber.java:132) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.checkTerminated(FluxWindowPredicate.java:765) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:659) ~[reactor-core-3.4.5.jar:3.4.5]
���~	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:745) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onComplete(FluxWindowPredicate.java:811) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:241) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:184) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[reactor-core-3.4.5.jar:3.4.5]
    at dev.miku.r2dbc.mysql.util.DiscardOnCancelSubscriber.onNext(DiscardOnCancelSubscriber.java:70) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[reactor-core-3.4.5.jar:3.4.5]
���}	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:250) ~[reactor-core-3.4.5.jar:3.4.5]
���m	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:199) ~[reactor-core-3.4.5.jar:3.4.5]
���s	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:118) ~[reactor-core-3.4.5.jar:3.4.5]
    at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[reactor-core-3.4.5.jar:3.4.5]
���m	at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:491) ~[reactor-core-3.4.5.jar:3.4.5]
���s	at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:299) ~[reactor-core-3.4.5.jar:3.4.5]
���o	at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27) ~[reactor-core-3.4.5.jar:3.4.5]
���n	at reactor.core.publisher.EmitterProcessor.onNext(EmitterProcessor.java:265) ~[reactor-core-3.4.5.jar:3.4.5]
    at dev.miku.r2dbc.mysql.client.ReactorNettyClient$ResponseSink.next(ReactorNettyClient.java:340) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at dev.miku.r2dbc.mysql.client.ReactorNettyClient.lambda$new$0(ReactorNettyClient.java:103) ~[r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
���p	at dev.miku.r2dbc.mysql.client.ReactorNettyClient$$Lambda$359/00000000EF038220.accept(Unknown Source) ~[na:na]
���m	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:184) ~[reactor-core-3.4.5.jar:3.4.5]
���{	at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:219) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
���{	at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:353) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:353) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:96) ~[reactor-netty-0.9.8.RELEASE.jar:0.9.8.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.handleDecoded(MessageDuplexCodec.java:187) [r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.channelRead(MessageDuplexCodec.java:95) [r2dbc-mysql-0.8.2.RELEASE.jar:0.8.2.RELEASE]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [netty-codec-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [netty-codec-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
���q	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.50.Final.jar:4.1.50.Final]
���{	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.50.Final.jar:4.1.50.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.50.Final.jar:4.1.50.Final]
���9	at java.lang.Thread.run(Thread.java:821) [na:1.8.0_242]
cer commented

This error occurs in this branch: https://github.com/eventuate-tram/eventuate-tram-core/tree/wip-command-name-mapping
Specifically, this commit 5052b7e

cer commented


> Task :eventuate-tram-spring-reactive-consumer-jdbc:dependencyInsight
io.projectreactor:reactor-core:3.4.5
   variant "apiElements" [
      org.gradle.category                 = library
      org.gradle.dependency.bundling      = external
      org.gradle.jvm.version              = 8
      org.gradle.libraryelements          = jar (compatible with: classes)
      org.gradle.usage                    = java-api
      org.jetbrains.kotlin.localToProject = public (not requested)
      org.jetbrains.kotlin.platform.type  = jvm (not requested)
      org.gradle.status                   = release (not requested)
   ]
   Selection reasons:
      - By conflict resolution : between versions 3.4.5, 3.3.6.RELEASE and 3.3.4.RELEASE

io.projectreactor:reactor-core:3.4.5
+--- project :eventuate-tram-reactive-consumer-common
|    +--- compileClasspath
|    \--- project :eventuate-tram-reactive-consumer-jdbc
|         \--- compileClasspath
+--- org.springframework:spring-r2dbc:5.3.6
|    \--- org.springframework.data:spring-data-r2dbc:1.3.0
|         \--- io.eventuate.common:eventuate-common-spring-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-5
|              +--- compileClasspath
|              \--- project :eventuate-tram-reactive-consumer-jdbc (*)
\--- org.springframework.data:spring-data-r2dbc:1.3.0 (*)

io.projectreactor:reactor-core:3.3.4.RELEASE -> 3.4.5
\--- io.projectreactor.addons:reactor-extra:3.3.3.RELEASE
     \--- dev.miku:r2dbc-mysql:0.8.2.RELEASE
          \--- io.eventuate.common:eventuate-common-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-2
               \--- io.eventuate.common:eventuate-common-spring-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-5
                    +--- compileClasspath
                    \--- project :eventuate-tram-reactive-consumer-jdbc
                         \--- compileClasspath

io.projectreactor:reactor-core:3.3.6.RELEASE -> 3.4.5
+--- dev.miku:r2dbc-mysql:0.8.2.RELEASE
|    \--- io.eventuate.common:eventuate-common-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-2
|         \--- io.eventuate.common:eventuate-common-spring-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-5
|              +--- compileClasspath
|              \--- project :eventuate-tram-reactive-consumer-jdbc
|                   \--- compileClasspath
\--- io.projectreactor.netty:reactor-netty:0.9.8.RELEASE
     \--- dev.miku:r2dbc-mysql:0.8.2.RELEASE (*)

(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

cer commented

Subscriber is in the reactive-streams module:

org.reactivestreams:reactive-streams:1.0.3
+--- io.projectreactor:reactor-core:3.4.5
|    +--- project :eventuate-tram-reactive-consumer-common
|    |    +--- compileClasspath
|    |    \--- project :eventuate-tram-reactive-consumer-jdbc
|    |         \--- compileClasspath
|    +--- org.springframework.data:spring-data-r2dbc:1.3.0
|    |    \--- io.eventuate.common:eventuate-common-spring-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-5
|    |         +--- compileClasspath
|    |         \--- project :eventuate-tram-reactive-consumer-jdbc (*)
|    +--- dev.miku:r2dbc-mysql:0.8.2.RELEASE (requested io.projectreactor:reactor-core:3.3.6.RELEASE)
|    |    \--- io.eventuate.common:eventuate-common-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-2
|    |         \--- io.eventuate.common:eventuate-common-spring-reactive-jdbc:0.15.0.BUILD-SNAPSHOT:20210622.160945-5 (*)
|    +--- org.springframework:spring-r2dbc:5.3.6
|    |    \--- org.springframework.data:spring-data-r2dbc:1.3.0 (*)
|    +--- io.projectreactor.addons:reactor-extra:3.3.3.RELEASE (requested io.projectreactor:reactor-core:3.3.4.RELEASE)
|    |    \--- dev.miku:r2dbc-mysql:0.8.2.RELEASE (*)
|    \--- io.projectreactor.netty:reactor-netty:0.9.8.RELEASE (requested io.projectreactor:reactor-core:3.3.6.RELEASE)
|         \--- dev.miku:r2dbc-mysql:0.8.2.RELEASE (*)
\--- io.r2dbc:r2dbc-spi:0.8.4.RELEASE
     +--- org.springframework.data:spring-data-r2dbc:1.3.0 (*)
     +--- dev.miku:r2dbc-mysql:0.8.2.RELEASE (requested io.r2dbc:r2dbc-spi:0.8.2.RELEASE) (*)
     \--- org.springframework:spring-r2dbc:5.3.6 (*)

cer commented

Seems to be a JDK specific problem.

The shell was using:

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
Eclipse OpenJ9 VM

Switching to openjdk version "1.8.0_302"
OpenJDK Runtime Environment Corretto-8.302.08.1 seems to have fixed the problem.