binance-connector-java icon indicating copy to clipboard operation
binance-connector-java copied to clipboard

binance-derivatives-trading-usds-futures incompatible with Jetty 12

Open andrii-k6a opened this issue 1 year ago • 5 comments

When using Jetty 12.0.12, the connector fails with the following error: java.lang.NoClassDefFoundError: org/eclipse/jetty/client/api/Response$CompleteListener

This indicates that binance-derivatives-trading-usds-futures is not compatible with Jetty 12. With Jetty 10 and 11 reaching End of Life (EOL (End of Life) for Jetty 10 / Jetty 11 - January 2025), please add support for Jetty 12+ in the SDK to ensure continued compatibility.

andrii-k6a avatar Jul 07 '25 10:07 andrii-k6a

Hello @andrii-k6a ,

Indeed for now Binance uses Jetty 11 to keep the SDK compatible with Java 11. We will migrate once most of the users migrated to Java 17 or newer.

In the meantime, please let us know if you face any issue with Jetty 11.

Thank you.

theo-s68 avatar Jul 07 '25 12:07 theo-s68

The issue is that the deprecated connector works fine with Jetty 12, but switching to the new connector would require downgrading other dependencies, which I’d rather avoid.

andrii-k6a avatar Jul 07 '25 22:07 andrii-k6a

Hello @andrii-k6a ,

Indeed for now Binance uses Jetty 11 to keep the SDK compatible with Java 11. We will migrate once most of the users migrated to Java 17 or newer.

In the meantime, please let us know if you face any issue with Jetty 11.

Thank you.

So, how to fix this problem right now? (Java 17)

luniard avatar Jul 15 '25 09:07 luniard

Ive been dealing with the same problem trying to use simple websocket connection on the Spot connector (java 17), i've been trying to insert by hand jetty dependencies and exploring possible solutions, came out to the conclusion that the responsibility of managing jetty dependency should be from the Binance connector, tried many version combinations but ultimately it doesn't work

binance-spot: 6.0.0 binance-connector-java: 3.4.1

code snippet that generates the error: WebSocketClientConfiguration clientConfiguration = new WebSocketClientConfiguration(); clientConfiguration.setSignatureConfiguration(signatureConfig); this.spotWebSocketStreams = new SpotWebSocketStreams(clientConfiguration);

---- EDIT ---- i've managed to get pass the classNotFound excepton by using all of these libraries in my pom.xml:

	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-client</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-io</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-util</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-http</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty</groupId>
		<artifactId>jetty-slf4j-impl</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty.websocket</groupId>
		<artifactId>websocket-jetty-client</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty.websocket</groupId>
		<artifactId>websocket-jetty-api</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty.websocket</groupId>
		<artifactId>websocket-jetty-common</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty.websocket</groupId>
		<artifactId>websocket-core-client</artifactId>
		<version>11.0.26</version>
	</dependency>
	<dependency>
		<groupId>org.eclipse.jetty.websocket</groupId>
		<artifactId>websocket-core-common</artifactId>
		<version>11.0.26</version>
	</dependency>

in which i was able to at least start the application, im getting different errors while trying to use the websocket but i don't know yet if they are related to the mismatch between versions, i'll figure it out and add here later if that's the case

---- EDIT 2 ---- From what i could test, it seems to be working, i've managed to listen to the "rollingWindowTicker" websocket example, in theory it should work for this issue aswell

rbm4 avatar Aug 24 '25 15:08 rbm4

In the meantime, please let us know if you face any issue with Jetty 11.

@theo-s68 Hi. What about:

  • High severity CVE-2026-10050 https://github.com/advisories/GHSA-2fvj-hgj9-j2gr
  • High severity CVE-2026-2332 https://github.com/advisories/GHSA-355h-qmc2-wpwf
  • Moderate severity CVE-2024-6763 https://github.com/advisories/GHSA-qh8g-58pp-2wxh
  • Moderate severity CVE-2024-6763 https://github.com/advisories/GHSA-qh8g-58pp-2wxh
  • Moderate severity CVE-2026-6790 https://github.com/advisories/GHSA-7p3p-8qv8-m2vh
  • Low severity CVE-2025-11143 https://github.com/advisories/GHSA-wjpw-4j6x-6rwh

Also https://github.com/binance/binance-connector-java/issues/199#issuecomment-3857137091

AlexanderBartash avatar Feb 13 '26 12:02 AlexanderBartash

Guys, can you please do something about it? How long do we have to override Binance SDK dependencies in our projects? This is a financial platform.

AlexanderBartash avatar Jul 25 '26 09:07 AlexanderBartash

I encountered the same issue and hope to upgrade to Jetty 12.1.10 as soon as possible

1144602921 avatar Aug 01 '26 08:08 1144602921