Stripes: java.lang.NoSuchMethodException: net.sourceforge.stripes.action.Resolution.<init>

StackOverflow https://stackoverflow.com/questions/14280484

  •  15-01-2022
  •  | 
  •  

문제

I'm new to stripes, and I'm getting the following error when I do a post to my Java app:

java.lang.NoSuchMethodException: net.sourceforge.stripes.action.Resolution.<init>

The post is received fine, and the appropriate method gets called (setHeadings), but it leave as big stack dump in the logs and the console whenever the post happens, evidently because of the above.

What could be causing this issue?

도움이 되었습니까?

해결책

Turns out I had 2 methods named "setHeadings", and 2 methods named "getHeadings" with different signatures, and Stripes was getting confused and calling the wrong one.

So stripes was trying to call my "getHeadings" for the property, when it wanted a "getHeadings" for a resolution, so it could return a response.

The solution was to simply change my post methods name to "saveHeadings" instead of "setHeadings" to avoid the collision!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top