Struts 2 Model driven negative integer

余生长醉 提交于 2019-12-11 11:56:26

问题


How to assign a negative number (-123 or -123.00) to a ModelDriven bean (implements ModelDriven< Bean >). When i try passing the value through request for that action it throws below exception

Fri Aug 10 18:45:27 IST 2012 unable to convert value using type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter]
Overflow or underflow casting: "-123.12" into class java.lang.Double - [unknown location]
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.doConvertToNumber(XWorkBasicConverter.java:406)
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.doConvertToNumber(XWorkBasicConverter.java:415)
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.convertValue(XWorkBasicConverter.java:118)

来源:https://stackoverflow.com/questions/11902777/struts-2-model-driven-negative-integer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!