I am trying to run a spring boot batch job from PCF CLI using the command:
cf run-task TEST_APP “.Java-buildpack/oracle_jre/bin/java org/springframework/boot/loader/JarLauncher -D jobName=job1”
But the task is failing with the following error in logs:
ERR Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
ERR Caused by: Java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
Please advise.
It works fine with open_jdk_jre...
cf run-task TEST_APP ".java-buildpack/open_jdk_jre/bin/java org/springframework/boot/loader/JarLauncher -D jobName=job"
Seems you have oracle_jre so give it a try:
cf run-task TEST_APP ".java-buildpack/oracle_jre/bin/java org.springframework.boot.loader.JarLauncher -D jobName=job1"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.