{"record":{"id":"3bb3380641f1c531","repo":"eclipse-vertx/vert.x","slug":"this-java-runtime-does-not-support-virtual-threads-3bb338","errorCode":null,"errorMessage":"This Java runtime does not support virtual threads","messagePattern":"This Java runtime does not support virtual threads","errorType":"exception","errorClass":"VertxException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/impl/deployment/DefaultDeployment.java","lineNumber":67,"sourceCode":"        throw new VertxException(\"Supplied deployable is null\", true);\n      }\n      deployables.add(deployable);\n    }\n    if (deployables.size() != numberOfInstances) {\n      throw new VertxException(\"Same deployable supplied more than once\", true);\n    }\n    CloseableResource<WorkerPool> workerPool = null;\n    ThreadingModel mode = options.getThreadingModel();\n    if (mode == null) {\n      mode = ThreadingModel.EVENT_LOOP;\n    }\n    if (mode != ThreadingModel.VIRTUAL_THREAD) {\n      if (options.getWorkerPoolName() != null) {\n        workerPool = vertx.createSharedWorkerPool(options.getWorkerPoolName(), options.getWorkerPoolSize(), options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit());\n      }\n    } else {\n      if (!vertx.isVirtualThreadAvailable()) {\n        throw new VertxException(\"This Java runtime does not support virtual threads\", true);\n      }\n    }\n    ArrayList<Deployable> list = new ArrayList<>(deployables);\n    return new DefaultDeployment(vertx, options, log, list, identifierProvider.apply(list.get(0)), mode, workerPool, tccl);\n  }\n\n  private final VertxImpl vertx;\n  private final DeploymentOptions options;\n  private final Logger log;\n  private final List<Deployable> deployables;\n  private final ThreadingModel threading;\n  private final CloseableResource<WorkerPool> workerPoolResource;\n  private final WorkerPool workerPool;\n  private final String identifier;\n  private final List<Instance> instances = new CopyOnWriteArrayList<>();\n  private final ClassLoader tccl;\n\n  public DefaultDeployment(VertxImpl vertx,","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/impl/deployment/DefaultDeployment.java#L49-L85","documentation":"Environment capability check during deployment: the verticle's DeploymentOptions request the VIRTUAL_THREAD threading model, but the current Java runtime does not support virtual threads (JDK < 21 or preview disabled). Deployment aborts because worker execution cannot proceed as configured.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/impl/deployment/DefaultDeployment.java:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run on JDK 21+ with virtual threads enabled","Fall back to ThreadingModel.WORKER or EVENT_LOOP on older runtimes"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}