How to fix "update Byte Buddy or set net.bytebuddy.experimental as a VM property"

Posting this here because it took several hours to find the solution. Easy for a Java developer to fix, but not for me:

I used "mvn clean install" and it generated an error. Here's the error:

java.lang.AssertionError:
EqualsVerifier found a problem in class ai.philterd.philter.api.model.ResponseSpan.
-> Java 25 (69) is not supported by the current version of Byte Buddy which officially supports Java 22 (66) - update Byte Buddy or set net.bytebuddy.experimental as a VM property

For more information, go to: https://www.jqno.nl/equalsverifier/errormessages

That "more information" URL is useless. So are most other pages on this error. I eventually had more than a dozen tabs open, each giving a tiny fragment of the solution, none showing how to actually implement the solution, and half a dozen config-modifying tests which all failed before I finally found this:

Open pom.xml.

Add this dependency stanza somewhere beneath the <project> tag:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>LATEST</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

Save, and rerun mvn clean install.

Here are some links that provided separate clues toward this solution:

That is all.

Add a comment

Fields followed by * are mandatory

HTML code is displayed as text and web addresses are automatically converted.

Page top