ClassNotFoundException for Custom Scheduler Prototype v2

Alan Bateman alan.bateman at oracle.com
Thu Feb 26 07:20:21 UTC 2026



On 26/02/2026 02:49, Mengyang Li wrote:
> Hello everyone, With “Custom Scheduler Prototype v2”, the JDK loads 
> the class specified by jdk. virtualThreadScheduler. implClass via the 
> internal AppClassLoader. This works for typical apps, but fails for 
> Spring Boot fat JARs where the application
> ZjQcmQRYFpfptBannerStart
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> Report Suspicious
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/ACWV5N9M2RV99hQ!Op20OCZDNWNhvTus2_N8MeJEQnesskq2r7GgxGykDyNNA4-uycq0qHDbuRK5bSU5gg4W_jImRrnOgyqomqy_2daMLpQS4OFFnoqBuitf0k9uHzHKvNGoQNctgSuh8FHXjJ0$> 
>
> ZjQcmQRYFpfptBannerEnd
>
> :
>
> Would it be feasible to switch to an SPI  (similar to JDBC) so custom 
> schedulers are pluggable under non-standard class loaders? Potentially 
> the same approach could apply to a pluggable Poller API.
>
>
In this prototype, the scheduler is configured system-wide and cannot be 
changed mid-flight. It has to be visible to the application class 
loader, otherwise there would be no way to schedule virtual threads 
before the custom class loader is created. It can be re-visited if 
efforts in this area go further than the prototype. For now, the custom 
scheduler has to deployed on the class path or module path.

There is no Poller API. The class that I think you have found the JDK 
internal class that supports blocking operations when using the Socket 
and other networking APIs. It's not something that we want to expose in 
any way. If the context for your comment is a library that does syscalls 
directly (FFM or JNI) then the "primitive" that it can use to 
park/unpark virtual threads is LockSupport.park/unpark, it does not need 
Poller.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20260226/7f0843f3/attachment.htm>


More information about the loom-dev mailing list