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