Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic