Announcement Announcement Module
Collapse
No announcement yet.
NoSuchFieldError Exception throwed when running in Websphere Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoSuchFieldError Exception throwed when running in Websphere

    Hi
    I use spring portlet framework in my portlet dev,It's ok running on tomat,but when runing on websphere 5,the NoSuchFieldError throwed,Following is the error message:

    Nested Exception is java.lang.NoSuchFieldError: org.springframework.validation.AbstractBindingResu lt: field MODEL_KEY_PREFIX not found
    at org.springframework.validation.AbstractBindingResu lt.getModel(AbstractBindingResult.java:345)
    at org.springframework.validation.BindException.getMo del(BindException.java:206)
    at org.springframework.web.portlet.mvc.AbstractFormCo ntroller.showForm(AbstractFormController.java:818)
    at org.springframework.web.portlet.mvc.SimpleFormCont roller.showForm(SimpleFormController.java:226)

    ....


    I use spring.jar and spring-portlet.jar released in 2.0M4.

    please give me advice,Thinks.

  • #2
    Make sure you don't have any old spring.jar inside websphere (maybe at server level). This error usually occurs, when some different version is found on the parent classpath and used instead of yours.

    Comment


    • #3
      Thanks for your reply

      First,Thanks for your reply,but I has searched all the classpath(include those of parent classloader),there are no any older version,I doubt the jdk version lead this issue(Websphere 5 use jdk1.3 ).

      I modify the code(at 345 line) in AbstractBindingResult.java

      model.put(MODEL_KEY_PREFIX + getObjectName(), this);

      to

      model.put(BindingResult.MODEL_KEY_PREFIX + getObjectName(), this);

      and rebuild the spring code and get the spring.jar,and the issue solved.

      But I need official solution however,so any advice is appreciated!

      Thank u for your reply again.

      Best Rgds

      Comment

      Working...
      X