Atmosphere/atmosphere

java.nio.ByteBuffer.flip()

fcorneli opened this issue · 12 comments

Atmosphere version: 2.7.14
Java version: 8
We get the following exception:

15:21:08,709 ERROR [org.atmosphere.cpr.AsynchronousProcessor] (nioEventLoopGroup-3-5) : java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at org.atmosphere.client.TrackMessageSizeInterceptor$Interceptor.transformPayload(TrackMessageSizeInterceptor.java:173)

This did not happen on Atmosphere versions 2.7.10, 2.7.11.

@fcorneli Which jdk8 version exactly? I can't reproduce

java --version
openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)
java -version
java version "1.8.0_411"
Java(TM) SE Runtime Environment (build 1.8.0_411-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.411-b09, mixed mode)

Running on macOS:

uname -a     
Darwin MacBook-Pro-van-Frank.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 arm64

The atmosphere runtime is running embedded within a JBoss EAP 7.4.

Thanks. When I look at gitblame, I don't see recent changes...
image
Digging!

Ah got it. The release has probably been made using jdk 21.

Yep. Was just also thinking about this... :)

@fcorneli Do you need a new release? I was waiting for a fix or two before re-releasing using jdk8

@jfarcand Not urgent from our side.