Skip to content
Advertisement

Tag: spring

Failed to load Main-Class manifest attribute while running java -jar

I have successfully built my Spring MVC project with mvn clean package by following this tutorial. Now I am trying to run the service with: But I get this error: Failed to load Main-Class manifest attribute from target/gs-serving-web-content-0.1.0.jar Am I missing something? Answer If you are working with Spring Boot this will solve your problem: Reference Guide | Spring Boot

Manually call Spring Annotation Validation

I’m doing a lot of our validation with Hibernate and Spring Annotations like so: And then in the controller it’s called in the arguments: But I would like to decide the group used based on some logic in the controller method. Is there a way to call validation manually? Something like result = account.validate(Account.Step1.class)? I am aware of creating your

SPRING java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext

It seems people have had similar problems, but on IDE’s. I am not using an IDE. I installed Spring using a Maven dependency as you will see in my build.xml file. I get the following stacktrace that says org.springframework.context is not found: run-decouple: BUILD SUCCESSFUL Total time: 4 seconds Here is my client (java file: DecoupledDataReaderClient.java): Here is my build.xml

Advertisement