1

When I tried to run jar of my spring boot application using command, I am getting this error.

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
    at com.cisc.cisc.main.ciscApplication.main(ciscApplication.java:34)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 1 more

I am using modularized spring boot application. I tried all of the solutions that I read in the discussions. Nothing worked for me.

DMA
  • 11
  • 3
  • when you make a jar file do you set `mainClass`? – TongChen Mar 09 '19 at 08:16
  • https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven – uneq95 Mar 09 '19 at 09:52
  • Can you share your project module details and all maven poms for all modules? I was facing the same issue and the problem is one of the class was missing, Getting a not found error bcause It was expected by one of the dependencies. – Hardik Patel Sep 14 '22 at 07:29

0 Answers0