You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I believe I am encountering the same issue as #770 . When I try to deploy to Google Cloud, I get a JarLauncher not found error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/loader/JarLauncher
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at com.google.cloud.functions.invoker.runner.Invoker.loadFunctionClass(Invoker.java:357)
at com.google.cloud.functions.invoker.runner.Invoker.startServer(Invoker.java:294)
at com.google.cloud.functions.invoker.runner.Invoker.startServer(Invoker.java:244)
at com.google.cloud.functions.invoker.runner.Invoker.main(Invoker.java:127)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 14 more
When I try to run the jar file locally (although maybe this is expected?) I get a similar error:
Error: Could not find or load main class org.springframework.cloud.function.adapter.gcp.GcfJarLauncher
Caused by: java.lang.NoClassDefFoundError: org.springframework.boot.loader.JarLauncher
Running the function locally via mvn function:run works.
To confirm if this is an issue with my code or something else, I tried downloading the sample GCP HTTP function and deploying. That, too, fails with the same error.
I have exactly the same issue. I think this is a problem of the bootJar plugin or the layout configuration. The resulting boot JAR contains only the files from spring-boot-loader but not from spring-boot-loader-classic, which is the one that is used by the GCP adapter.
Describe the bug
I believe I am encountering the same issue as #770 . When I try to deploy to Google Cloud, I get a JarLauncher not found error.
When I try to run the jar file locally (although maybe this is expected?) I get a similar error:
Running the function locally via
mvn function:run
works.This is my pom.xml:
This is my manifest file.
The text was updated successfully, but these errors were encountered: