• Post Reply Bookmark Topic Watch Topic
  • New Topic

ognl.MethodFailedException setting BigDecimal in Strust 2

 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed the problem by adding a custom converter for BigDecimal values.
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!