Skip to content

after migration from jdk17 to jdk21 junit is failing and ignoring surefire arling arguments for --add-open java.lang and junit fails throwing InaccessbleObjectException #11398

@kavita369

Description

@kavita369

Affected version

jdk21 maven version is 3.9.9 maven-compiler-plugin.version=3.14.0,Jacoco Version 0.8.11, aven Surefire Plugin 3.1.2

Bug description

We have migrated our springboot project from jdk17 to jdk21. In pom I have changed 1. jdk version to 21, 2. <maven-compiler-plugin.version>3.14.0 3. jacoco.version> 0.8.11 in and has --add-open java.base/java.lang=All-UNNAMED. This pom has reference to pom which in turn has springboot-starter-parent defined as tag with version as 3.2.5. 3 junits are failing with InAccessibleObjectException related to reflection. which we otherwise passing during clean intall with jdk17 and --add-open option defined in pom. are the version correct for jdk21

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmvn3waiting-for-feedbackWaiting for 90 days until issues or pull request will be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions