Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building With JDK11 Breaks TCP (NIO) #3470

Closed
garyrussell opened this issue Jan 22, 2021 · 1 comment · Fixed by #3471
Closed

Building With JDK11 Breaks TCP (NIO) #3470

garyrussell opened this issue Jan 22, 2021 · 1 comment · Fixed by #3471
Assignees
Milestone

Comments

@garyrussell
Copy link
Contributor

garyrussell commented Jan 22, 2021

See spring-projects/spring-integration-samples#291

ByteBuffer.flip() now returns ByteBuffer, previously it returned Buffer.

Cannot run with JDK8.

Exception in thread "pool-2-thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at org.springframework.integration.ip.tcp.connection.TcpNioConnection.doRead(TcpNioConnection.java:437)
	at org.springframework.integration.ip.tcp.connection.TcpNioConnection.readPacket(TcpNioConnection.java:499)
	at org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory.lambda$processNioSelections$7(AbstractConnectionFactory.java:708)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

WorkAround:

plasma-umass/doppio#497 (comment)

@garyrussell garyrussell added this to the 5.5 M2 milestone Jan 22, 2021
@garyrussell garyrussell self-assigned this Jan 22, 2021
garyrussell added a commit to garyrussell/spring-integration that referenced this issue Jan 22, 2021
Resolves spring-projects#3470

In order to catch issues like this at compile time, we need to set
the `bootClasspath` to ensure API compatibility but this would need some
consistent way to point the JDK 8 libs on all platforms (CI, GitHub Workflows,
dev machines, etc).
artembilan pushed a commit that referenced this issue Jan 22, 2021
Resolves #3470

In order to catch issues like this at compile time, we need to set
the `bootClasspath` to ensure API compatibility but this would need some
consistent way to point the JDK 8 libs on all platforms (CI, GitHub Workflows,
dev machines, etc).
@garyrussell
Copy link
Contributor Author

Reopening. Other methods suffer from the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant