-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
-
None
-
None
-
False
-
None
-
False
-
-
rhn-engineering-bban JGRP-2660 still breaks when using JDK19 without --enable-preview:
java.lang.IllegalArgumentException: failed initializing component ThreadPool in protocol UDP: java.lang.IllegalStateException: failed to create virtual thread pool: java.lang.UnsupportedOperationException: Preview Features not enabled, need to run with --enable-preview at org.jgroups@5.2.10.Final//org.jgroups.stack.ProtocolStack.lambda$initComponents$7(ProtocolStack.java:861) at org.jgroups@5.2.10.Final//org.jgroups.util.Util.forAllComponents(Util.java:3368) at org.jgroups@5.2.10.Final//org.jgroups.stack.ProtocolStack.initComponents(ProtocolStack.java:839) at org.jgroups@5.2.10.Final//org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:795) at org.jgroups@5.2.10.Final//org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:781) at org.jgroups@5.2.10.Final//org.jgroups.stack.ProtocolStack.init(ProtocolStack.java:777) at org.jgroups@5.2.10.Final//org.jgroups.JChannel.<init>(JChannel.java:155)
Side note: this would be easier to diagnose if you construct the IAE with its cause (with full trace) here (rather than just the exception message): https://github.com/belaban/JGroups/blob/master/src/org/jgroups/stack/ProtocolStack.java#L861
When preview features are not enabled on JDK19+, ThreadCreator.hasVirtualThreads() still returns true. This is because the Thread$Builder$OfVirtual class exists and the requisite MethodHandle can still be constructed, however invoking this method will fail at runtime with an UnsupportedOperationException.