-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Description
This report details a critical runtime exception encountered for derivatives trading (USDS Futures) within a Play Framework 3 / Pekko environment.
When initializing the WebSocket client within a CompletableFuture (e.g., on Play's default ForkJoinPool), the ServiceLoader mechanism fails to find Jetty WebSocket extension implementations.
- Error:
java.util.NoSuchElementExceptionoriginating fromjava.util.ServiceLoaderand traced up throughorg.eclipse.jetty.websocket.api.ExtensionConfig.getParser. - Cause: The
ServiceLoaderrelies on theThread.currentThread().getContextClassLoader(). When the initialization code runs on a worker thread from a thread pool (likeForkJoinPool), this context classloader may not have visibility of the full application dependency classpath where the Jetty service implementations reside. - Trigger: Instantiating
new DerivativesTradingUsdsFuturesWebSocketStreams(wsConnectionPool)inside aCompletableFuture.supplyAsync()block.
Metadata
Metadata
Assignees
Labels
No labels