Issues when running gradle tests with circleci/openjdk:11-jdk

We recently upgraded our Spring boot app to use Java11 but we are having some issues when running the tests in circleci.

We are using the docker image: circleci/openjdk:11-jdk.

But during the tests we are getting the following exceptions:
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.base/java.lang.Class.getField(

Any idea what the problem might be and how to solve it?