getting error of java.lang.NoClassDefFoundError
while executing the submit button, the compilation was really successfull and the build/class/
Error
-------
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@31809212: defining beans [crunchifyHelloWorld,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,viewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Jul 17, 2015 2:09:59 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: com/crunchify/controller/PasswordCheck
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getDeclaredMethods(Class.java:1855)
src/com/crunchify/controller/CrunchifyHelloWorld.java
package com.crunchify.controller;
import com.crunchify.controller.PasswordCheck;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.validation.*;
import org.springframework.web.servlet.ModelAndView;
/*
* author: Crunchify.com
*
*/
@Controller
public class CrunchifyHelloWorld {
@RequestMapping("/welcome")
public ModelAndView helloWorld() {
String message = "<br><div style='text-align:center;'>" +
"<h3>********** Welcome to LDO Support Landing page **********<h3> </div><br><br>";
return new ModelAndView("welcome", "message", message);
}
@RequestMapping(value = "/loginCheck", method = RequestMethod.GET)
public ModelAndView addContact(@ModelAttribute("index")
com.crunchify.controller.PasswordCheck passcheck, BindingResult result) {
System.out.println("userid:" + passcheck.getUser_id() + "password:" + passcheck.getPassword());
//return "redirect:contacts.html";
String message = "<br><div style='text-align:center;'>" +
"<h3>********** Welcome to LDO Support Landing page **********<h3> </div><br><br>";
return new ModelAndView("welcome", "message", message);
}
}
src/com/crunchify/controller/PasswordCheck.java
package com.crunchify.controller;
public class PasswordCheck {
private String user_id;
private String password;
public String getUser_id() {
return user_id;
}
public void setUser_id(String user_id) {
this.user_id = user_id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}