This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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