Docker Java 11 maven test issue: SurefireBooterForkException

At work, we use Docker containers to run Behaviour Driven Development (BDD) tests. The container originally used Java 8, but the vendor server upgraded to Java 11. When installing Java 11 and maven to run the BDD (Cucumber) tests. But we encountered the following error:
[ERROR] Process Exit Code: 1 
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Suggested fix here and stack overflow mention here. Fix = set maven surefire plugin config useSystemClassLoader = false
Works like a charm after this -> mvn test

One Reply to “Docker Java 11 maven test issue: SurefireBooterForkException”

Leave a Reply

Your email address will not be published. Required fields are marked *