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

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

  •  15-01-2022
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top