Announcement Announcement Module
Collapse
No announcement yet.
Very strange exception or bug of Spring??? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Very strange exception or bug of Spring???

    Hi,
    I have a very strange exception when I create a new RequestContext inside the following method:
    Code:
    	protected ModelAndView processFinish(HttpServletRequest request,
    										 HttpServletResponse response,
    										 Object command,
    										 BindException errors)	throws Exception{
    	   	RequestContext rc = new 	RequestContext(request);
    		BindStatus bind = rc.getBindStatus("document.version");
    .
    .
    .
    }
    When I run the method, it occurs an exception that I don't understand at all. You can see it in the code
    Code:
    java.lang.NoSuchMethodError: org.springframework.web.servlet.support.RequestContext.getBindStatus(Ljava/lang/String;)Lorg/springframework/web/servlet/support/BindStatus;
    	be.arafox.gedeon.web.mvc.admin.IncomingDocumentEditorController.processFinish(IncomingDocumentEditorController.java:113)
    	org.springframework.web.servlet.mvc.AbstractWizardFormController.validatePagesAndFinish(AbstractWizardFormController.java:485)
    	org.springframework.web.servlet.mvc.AbstractWizardFormController.processFormSubmission(AbstractWizardFormController.java:352)
    	org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:236)
    	org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:121)
    	org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:485)
    	org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:342)
    	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:328)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    This method exists in the RequestContext class. Why the java.lang.NoSuchMethodError is throwed. I have a strong doubt that is a bug of Spring and that is why all the macro in spring.vm for Velocity do not work at all. Please share your opinions.
    Thank you

    [/code][/quote]

  • #2
    Make sure the Spring version you build against is the same one your code sees at runtime. Basicly check your build-time classpath and run-time classpath, and make sure your code is getting the Spring classes you think it's getting. :wink:

    Comment


    • #3
      I checked it and that is the problem of my Subversion which does not delete the old version. You are right, Jing Xue.
      Thanks

      Comment

      Working...
      X