Reputation: 1079
I was instructed to make use of the STS (Spring Tool Suite) for a java course I am enrolled in. I have downloaded STS version 3.9.3 with platform Eclipse Oxygen 3 (4.7.3).
When I start up STS, I do the following:
Click File -> New -> Import Spring Getting Started Content
I do a search on rest
I select rest services with a code set of initial and complete
Once the application is generated, I navigate to the gs-rest-service-complete/src/main/java/hello subdirectory and I see Application.java, Greeting.java, and GreetingController.java.
I click on the green run button and I get the following output in the console:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/util/Assert
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:263)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234)
at hello.Application.main(Application.java:10)
Caused by: java.lang.ClassNotFoundException: org.springframework.util.Assert
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 5 more
I did not make any modifications to any configuration settings or any code. I am brand new to this application and java programming. Why would I be getting this error? How do I resolve it?
Thank you. Jonathan
Upvotes: 0
Views: 1703
Reputation: 933
As you are using Maven build type, you need to do this steps in your project.
Upvotes: 1