#56989·quarkus

Native build fails with `quarkus-undertow` and Jackson 3 due to `NoClassDefFoundError: com/fasterxml/jackson/core/util/ByteArrayBuilder`

Author: mcollovatiCreated Sep 27, 2026Updated Oct 1, 2026
Labelskind/bugarea/native-imagearea/jackson

Describe the bug

Since Quarkus 3.33.3.3, the native build of an application with quarkus-undertow fails if the application has Jackson 3 (tools.jackson.core:jackson-core) on the classpath and does not have Jackson 2 core (com.fasterxml.jackson.core:jackson-core). The same application builds on 3.33.0.

We found this in a Vaadin application (Vaadin uses Jackson 3). The reproducer below does not use Vaadin.

Cause (as far as we can see):

  1. quarkus-http removes Jackson 2 from Vert.x. quarkus-http-parent manages io.vertx:vertx-core with exclusions for com.fasterxml.jackson.core:jackson-core and jackson-databind. With quarkus-undertow, the vertx-core that Maven selects comes through io.quarkus.http:quarkus-http-vertx-backend (it is the nearest one), so Jackson 2 core is not added through vertx-core.

  2. Before, Jackson 2 core was still on the classpath by chance, through this path: quarkus-vertx -> smallrye-mutiny-vertx-core:3.21.5 -> vertx-mutiny-generator:3.21.5 -> vertx-codegen:4.5.25 -> com.fasterxml.jackson.core:jackson-core:2.21.1. 3.33.3.3 updates the Mutiny Vert.x bindings to 3.23.1 (#56569). After smallrye/smallrye-mutiny-vertx-bindings#1316, vertx-mutiny-generator and vertx-codegen are no longer runtime dependencies. So Jackson 2 core is now gone.

  3. UndertowBuildStep has a guard for the case "no Jackson on the classpath": it registers io.vertx.core.json.Json and io.vertx.core.spi.JsonFactory for runtime initialization. But jacksonOnClasspath() compares only the artifactId:

    java
    if (appDep.getArtifactId().equals("jackson-core")) {
        return true;
    }

    Jackson 3 has the same artifactId (tools.jackson.core:jackson-core). So the guard thinks that Jackson 2 is present, and Json stays initialized at build time.

  4. At build time, Json.<clinit> loads QuarkusJacksonFactory (from quarkus-vertx). QuarkusJacksonFactory.codec() falls back to io.vertx.core.json.jackson.JacksonCodec, which needs Jackson 2 core. The build fails.

Before 3.33.3.3 the wrong guard result did not matter, because Jackson 2 core came in through vertx-codegen.

Expected behavior

The native build succeeds, as it does on 3.33.0 (and as it does on 3.33.3.3 when Jackson 3 is not on the classpath).

Actual behavior

Error: Class initialization of io.vertx.core.json.Json failed. This error is reported at image build time because class io.vertx.core.json.Json is registered for linking at image build time by command line and command line. Use the option

    '--initialize-at-run-time=io.vertx.core.json.Json'

 to explicitly request initialization of this class at run time.
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/util/ByteArrayBuilder
	at io.quarkus.vertx.runtime.jackson.QuarkusJacksonFactory.codec(QuarkusJacksonFactory.java:30)
	at io.vertx.core.json.Json.<clinit>(Json.java:28)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	...
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.util.ByteArrayBuilder
	...
[ERROR] Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed

How to Reproduce?

Reproducer: https://github.com/mcollovati/quarkus-vertx-jackson-core-reproducer

It has only quarkus-undertow, tools.jackson.core:jackson-core:3.1.5 and one trivial servlet.

Steps:

  1. git clone https://github.com/mcollovati/quarkus-vertx-jackson-core-reproducer && cd quarkus-vertx-jackson-core-reproducer
  2. ./mvnw clean package -Dnative -> fails with the error above (Quarkus 3.33.3.3 is the default).
  3. ./mvnw clean package -Dnative -Dquarkus.platform.version=3.33.0 -> succeeds.
  4. Optional: ./mvnw clean package -Dnative -Dwith-jackson2 -> succeeds. This profile adds com.fasterxml.jackson.core:jackson-core (the workaround).

Results of our runs (the BOM is io.quarkus:quarkus-bom):

Quarkus Dependencies Native build
3.33.0 quarkus-undertow + Jackson 3 core success
3.33.3.3 quarkus-undertow + Jackson 3 core failure
3.40.0 quarkus-undertow + Jackson 3 core failure
3.33.3.3 quarkus-undertow only success
3.33.3.3 quarkus-undertow + Jackson 3 core + Jackson 2 core success

mvn dependency:tree shows the difference:

3.33.0:

+- io.smallrye.reactive:smallrye-mutiny-vertx-core:jar:3.21.5:compile
|  \- io.smallrye.reactive:vertx-mutiny-generator:jar:3.21.5:compile
|     \- io.vertx:vertx-codegen:jar:4.5.25:compile
|        \- com.fasterxml.jackson.core:jackson-core:jar:2.21.1:compile
...
+- io.quarkus.http:quarkus-http-vertx-backend:jar:5.4.0:compile
|  +- io.vertx:vertx-core:jar:4.5.25:compile        (no jackson-core below it)

3.33.3.3:

+- io.smallrye.reactive:smallrye-mutiny-vertx-core:jar:3.23.1:compile
...
+- io.quarkus.http:quarkus-http-vertx-backend:jar:5.5.0:compile
|  +- io.vertx:vertx-core:jar:4.5.34:compile        (no jackson-core below it)

Workaround: add com.fasterxml.jackson.core:jackson-core to the application.

Output of uname -a or ver

Linux 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "25.0.4" 2026-07-21 OpenJDK Runtime Environment GraalVM CE 25.2.4+7.1 (build 25.0.4+7-jvmci-25.2-b20) OpenJDK 64-Bit Server VM GraalVM CE 25.2.4+7.1 (build 25.0.4+7-jvmci-25.2-b20, mixed mode, sharing

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.33.3.3 (also 3.40.0). 3.33.0 works.

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)

Additional information

No response