aspose file tools*
The moose likes Struts and the fly likes ognl.MethodFailedException setting BigDecimal in Strust 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ognl.MethodFailedException setting BigDecimal in Strust 2" Watch "ognl.MethodFailedException setting BigDecimal in Strust 2" New topic
Author

ognl.MethodFailedException setting BigDecimal in Strust 2

Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

I am converting an application from Struts 1 to Struts 2. I'm using Struts 2.2.1 and OGNL 3.0. For any of my BigDecimal fields I get an ognl.MethodFailedException error, java.lang.NoSuchMethodException when the value submitted from the form is null. It is looking for a setter that takes a String as a parameter. I know this is or was an issue in OGNL but I thought it was fixed. Any answers or solution? I have hundreds of BigDecimal fields.
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

Fixed the problem by adding a custom converter for BigDecimal values.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ognl.MethodFailedException setting BigDecimal in Strust 2