sparrow sparrow - 1 year ago 75
Java Question

Can't create a new object in Springboot application

I have a Spring boot web application. I have a another project, a jar file. I added this jar file to web application and created a new object from the jar file. There is no compilation error. but when ever I run I am getting run time exception java.lang.ClassNotFoundException. I don't know what's going wrong. Any help will be appreciated

Answer Source

Assuming you're using Maven, you're probably missing the Spring Boot Maven Plugin:


Without this you'll just get a small JAR with just your classes. With this plugin you get a "full" jar which contains all the dependencies you need.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download