Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java fails to find main class #40

Closed
cjfinnell opened this issue Nov 27, 2023 · 2 comments · Fixed by #41
Closed

Java fails to find main class #40

cjfinnell opened this issue Nov 27, 2023 · 2 comments · Fixed by #41

Comments

@cjfinnell
Copy link
Contributor

Commit 21d726f introduced a runtime error:

$ git log -n 1 --oneline
21d726f (HEAD -> master, origin/master, origin/HEAD) Bump org.springframework.boot:spring-boot-starter-parent

$ docker build --no-cache -t timveil/cockroachdb-dynamic-certs:latest . && docker run -it timveil/cockroachdb-dynamic-certs:latest
.
.
.
Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher

Rolling back 1 commit to 1267f6e shows no error:

$ git log -n 1 --oneline
1267f6e (HEAD) Bump org.springframework.boot:spring-boot-starter-parent

$ docker build --no-cache -t timveil/cockroachdb-dynamic-certs:latest . && docker run -it timveil/cockroachdb-dynamic-certs:latest
.
.
.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.1.5)

2023-11-27T17:28:10.206Z  INFO 1 --- [           main] io.crdb.docker.DynamicCertsApplication   : Starting DynamicCertsApplication v21.0.0-SNAPSHOT using Java 19.0.2 with PID 1 (/BOOT-INF/classes started by root in /)
cjfinnell added a commit to udacity/cockroach-dynamic-certs that referenced this issue Nov 28, 2023
@haneeshav
Copy link

I have been facing the same issue for the past week in my cockroachDB implementation. Updating the classpath to the new one or using the classic loader implementation should fix it

@cjfinnell
Copy link
Contributor Author

I have been facing the same issue for the past week in my cockroachDB implementation. Updating the classpath to the new one or using the classic loader implementation should fix it

I've implemented the fix here: #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants