Hi i am new to spring MVC. I am developeing a simple form in spring MVC in which i am getting the following error.Since 2 days i am trying hard to sole this but could not solve this. Please help me to resolve this so that i can make further progress.I think that its due to any jar file but unable to reach the right answer. Following jars i am using:
aopalliance-1.0.jar
commons-dbcp-1.1-rc2.jar
commons-logging-1.2.jar
commons-pool-1.1.jar
javax.servlet-api-3.1.0.jar
jstl-1.2.jar
spring-aop-4.2.0.RELEASE.jar
spring-beans-3.0.5.RELEASE.jar
spring-context-3.1.1.RELEASE.jar
spring-core-4.2.2.RELEASE.jar
spring-expression-4.2.2.RELEASE.jar
spring-web-4.2.2.RELEASE.jar
spring-webmvc-3.0.0.RELEASE.jar
i can post complete code if required. Please let me know.
<Oct 12, 2017 11:40:32 PM IST> <Error> <HTTP> <BEA-101216> <Servlet: "SM_FormHandling" failed to preload on startup in Web application: "SM_FormHandling".
java.lang.NoSuchMethodError: org.springframework.core.io.ResourceEditor.<init>(Lorg/springframework/core/io/ResourceLoader;)V
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:117)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace
>
<Oct 12, 2017 11:40:32 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "169334801172819" for task "29". Error is: "weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.springframework.core.io.ResourceEditor.<init>(Lorg/springframework/core/io/ResourceLoader;)V"
weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.springframework.core.io.ResourceEditor.<init>(Lorg/springframework/core/io/ResourceLoader;)V
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: org.springframework.core.io.ResourceEditor.<init>(Lorg/springframework/core/io/ResourceLoader;)V
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:117)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
Truncated. see log file for complete stacktrace
StudentController.java
@Controller
class StudentController {
@RequestMapping(value="/student" ,method=RequestMethod.GET)
public ModelAndView student(){
return new ModelAndView("student","command",new Student());
}
@RequestMapping(value="/addStudent" ,method=RequestMethod.POST)
public String addStudent(@ModelAttribute("SpringWeb")Student student,ModelMap model){
model.addAttribute("name",student.getName());
model.addAttribute("age",student.getAge());
model.addAttribute("id",student.getId());
return "result";
}
}
spring-webmvcand all other related/needed jars will be added automatically. - M. Deinum