Apress/pivotal-certified-pro-spring-dev-exam-02

Module not found: rt

naabin opened this issue · 1 comments

I am having an issue running the tests. I am very new to this module system of the java and Gradle. I have the following error appears when I tried to run the test case for createCriminalCase method of SimpleServiceOpterationService.

`Testing started at 9:40 pm ...
This project is a Criminal Evidence Management System proof of concept application. It is meant to be used together with the "Pivotal Certified Professional Spring Developer Exam, 2nd Edition" published by Apress in order to learn and practice Spring 5.x.

Task :chapter00:dao:compileJava FAILED
/Users/nabin/Downloads/pivotal-certified-pro-spring-dev-exam-02/chapter00/dao/src/main/java/module-info.java:11: error: module not found: rt
requires rt;
^
1 error
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':chapter00:dao:compileJava'.

Compilation failed; see the compiler error output for details.

Hello Naabin,

Please check your default JDK. The most recent version of this project builds with JDK 13 and Gradle 6.

Also please check the file pivotal-certified-pro-spring-dev-exam-02/chapter00/dao/src/main/java/module-info.java and make sure you have no requires rt; in it.

I rebuild the project before posting this message and the build passed. Whatever is happening is related to your local environment. I'm not sure I can help.

Good luck!