Skip to content

Update ByteBuddy dependency for Java 25 compatibility #1971

@ialveswr

Description

@ialveswr

Problem

MockServer 5.15.0 includes a transitive ByteBuddy dependency that predates Java 25 support.
ByteBuddy versions prior to 1.17.5 do not support Java 25 (class file version 69) and can cause errors such as:

Java 25 (69) is not supported by the current version of Byte Buddy which officially supports Java 24 (68) - update Byte Buddy or set net.bytebuddy.experimental as a VM property

I discovered this while researching compatibility issues during a Java 25 upgrade.
I applied the workaround below and did not encounter the error myself without the workaround either, but wanted to raise this for tracking.

Workaround

Exclude ByteBuddy from MockServer and explicitly declare a newer version:

testImplementation('org.mock-server:mockserver-junit-jupiter:5.15.0') {
    exclude group: 'net.bytebuddy'
}
testImplementation 'net.bytebuddy:byte-buddy:1.18.3'
testImplementation 'net.bytebuddy:byte-buddy-agent:1.18.3'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions