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

Jetty 12.0.13 fails to start when the threadpool-all-virtual module is enabled. #12265

Closed
dmitry-tantserov opened this issue Sep 12, 2024 · 0 comments · Fixed by #12321
Closed
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@dmitry-tantserov
Copy link

dmitry-tantserov commented Sep 12, 2024

Jetty version(s)
12.0.13

Jetty Environment
ee10

Java version/vendor (use: java -version)
openjdk version "21.0.4" 2024-07-16 LTS
OpenJDK Runtime Environment Corretto-21.0.4.7.1 (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.4.7.1 (build 21.0.4+7-LTS, mixed mode)

OS type/version
Ubuntu 22.04.4 LTS

Description
This PR has caused Jetty to fail to start when the threadpool-all-virtual module is enabled.

How to reproduce?
Starting Jetty with the threadpool-all-virtual module in the startup arguments causes the following error:

Config error java.lang.IllegalStateException: No suitable constructor:
  <New id="threadPool" class="org.eclipse.jetty.util.thread.VirtualThreadPool">
    <Arg type="int"><Property name="jetty.threadPool.maxThreads" default="200"/></Arg>
    <Set name="name" property="jetty.threadPool.namePrefix"/>
    <Set name="tracking" property="jetty.threadPool.tracking"/>
    <Set name="detailedDump" property="jetty.threadPool.detailedDump"/>
  </New>
on null at
  <New id="threadPool" class="org.eclipse.jetty.util.thread.VirtualThreadPool">
    <Arg type="int"><Property name="jetty.threadPool.maxThreads" default="200"/></Arg>
    <Set name="name" property="jetty.threadPool.namePrefix"/>
    <Set name="tracking" property="jetty.threadPool.tracking"/>
    <Set name="detailedDump" property="jetty.threadPool.detailedDump"/>
  </New>
in file:///opt/jetty/etc/jetty-threadpool-all-virtual.xml

Presumably, this line should be changed to:
<Set name="maxThreads" type="int"><Property name="jetty.threadPool.maxThreads" default="200"/></Set>.

@dmitry-tantserov dmitry-tantserov added the Bug For general bugs on Jetty side label Sep 12, 2024
@sbordet sbordet self-assigned this Sep 12, 2024
sbordet added a commit that referenced this issue Sep 26, 2024
…irtual module is enabled.

Added missing constructor and test case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
Status: ✅ Done
2 participants