Skip to content

[Bug]: Dependency conflict after upgrading to Testcontainers 2.0.5 #11771

@andy505050

Description

@andy505050

Module

Core

Testcontainers version

2.0.5

Using the latest Testcontainers version?

Yes

Host OS

windows11 wsl2 ubuntu24

Host Arch

x86

Docker version

❯ docker -v
Docker version 29.4.3, build 055a478

What happened?

After upgrading to Testcontainers 2.0.5, container startup started failing with a runtime dependency error.

Symptom

Starting a container fails with:

NoClassDefFoundError: org/apache/commons/lang3/ArrayFill

Cause

Testcontainers 2.0.5 brings in commons-compress 1.28.0.

commons-compress 1.28.0 appears to require a newer version of commons-lang3. If the project resolves an older commons-lang3 version, such as 3.13.0, the ArrayFill class is missing from the runtime classpath and container startup fails.

Workaround

Explicitly add a newer commons-lang3 version, such as 3.18.0, to the test classpath.

Expected behavior

Testcontainers 2.0.5 should either avoid resolving an incompatible commons-lang3 version at runtime, or document the minimum required commons-lang3 version when commons-compress 1.28.0 is used.

Relevant log output

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions