Solution 1 :
You needed to change the packaging parameter to jar from pom. Also, the repositories, pluginRepositories, the maven-compiler-plugin and the spring-boot-maven-plugin’s version and executions weren’t needed.
Try mvn install and see if it works
<!-- The main class to start by executing java -jar -->
Enable the main() method in your Application.java.
Configure spring-boot-maven-plugin to specify the class with the main class (Spring should find it anyway if you have one, but good to be explicit):
177 total views, no views today
1. Same Problem occur with me
I went to project > properties > javaBuildPath.
There In order of export , I moved up my java/main to the top priority.
went to run configurations: – run->run configurations In the Classpath tab
Add where Eclipse usually put the *.class for the projects, which is in bin. So I added the bin directory for the project.
3. Project -> Clean
Make sure Project -> Build automatically is active
Project -> Properties -> Java Build Path -> Libraries: Remove any external libs you have ever added. Don’t remove standard libraries like the JRE System Library.
Try to run your main class now. The “class could not be found / load” error should be gone. Try adding your external libs/jars one after each other.
I hope it helps someone out there.
167 total views, no views today
Problem Statements :
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
The method myMethod(SomeClass) from the type MyOtherClass refers to the missing type (insert java type here: InputStream|File|Vector|IOException|etc)
- Close the project and reopen it.
- Clean the project (It will rebuild the buildpath hence reconfiguring with the JDK libraries)
- Delete and Re-import the project and if necessary do the above steps again.
The following steps could help:
- Right-click on project » Properties » Java Build Path
- Select Libraries tab
- Find the JRE System Library and remove it
- Click Add Library… button at right side » Add the JRE System Library (Workspace default JRE)
Add this entry in your POM.xml file
189 total views, no views today
You can’t send a request body with an HTTP GET request. You should modify your call so that it only supports POST, and POST your JSON to that endpoint.
If you want to GET information about a bean, you should create a separate controller method that does that (and does not require a request body).
Also, double-check your endpoint definitions in the $.ajax call.
204 total views, no views today