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

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

  •  15-01-2022
  •  | 
  •  

Domanda

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?

È stato utile?

Soluzione

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!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top