Hey guys-
I'm trying to track down a case where I'm getting an exception when saving an order. This isn't happening all of the time, but on occasion.
Exception msg:
Exception Name = com.konakart.app.KKException<br>Exception Message = java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
Server log output:
WARN (OrderMgr.java:saveOrder:471) Exception saving an order: Query details:
Criteria:: orders_products.products_model<=>orders_products.products_model='pallet': orders_products.orders_id<=>orders_products.orders_id=103397: orders_products.products_type<=>orders_products.products_type=0: orders_products.products_price_0<=>orders_products.products_price_0=2.38: orders_products.products_id<=>orders_products.products_id=1319: orders_products.products_price<=>orders_products.products_price=2.38: orders_products.products_name<=>orders_products.products_name='JFC White Shirataki Noodles 16.0 oz':
Current Query SQL (may not be complete or applicable): SELECT FROM orders_products WHERE orders_products.products_model='pallet' AND orders_products.orders_id=103397 AND orders_products.products_type=0 AND orders_products.products_price_0=2.38 AND orders_products.products_id=1319 AND orders_products.products_price=2.38 AND orders_products.products_name='JFC White Shirataki Noodles 16.0 oz'
I did some research on the Arithmetic exception, and it has to do with BigDecimal, usually when the divide function is trying to be used. I know for sure I'm not doing a divide function on any of my BigDecimal order values before I attempt to save. I am doing a couple of multiply functions, however. I've tried following the suggestions here: http://www.jroller.com/nwinkler/entry/the_trouble_with_bigdecimal
They suggest always passing a string to the BigDecimal constructor when creating a new BigDecimal to work with. I get the same error either way.
Is there something on/around line 471 in the saveOrder method that could be helpful in diagnosing why this is happening?
Thanks in advance..
I'm trying to track down a case where I'm getting an exception when saving an order. This isn't happening all of the time, but on occasion.
Exception msg:
Exception Name = com.konakart.app.KKException<br>Exception Message = java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
Server log output:
WARN (OrderMgr.java:saveOrder:471) Exception saving an order: Query details:
Criteria:: orders_products.products_model<=>orders_products.products_model='pallet': orders_products.orders_id<=>orders_products.orders_id=103397: orders_products.products_type<=>orders_products.products_type=0: orders_products.products_price_0<=>orders_products.products_price_0=2.38: orders_products.products_id<=>orders_products.products_id=1319: orders_products.products_price<=>orders_products.products_price=2.38: orders_products.products_name<=>orders_products.products_name='JFC White Shirataki Noodles 16.0 oz':
Current Query SQL (may not be complete or applicable): SELECT FROM orders_products WHERE orders_products.products_model='pallet' AND orders_products.orders_id=103397 AND orders_products.products_type=0 AND orders_products.products_price_0=2.38 AND orders_products.products_id=1319 AND orders_products.products_price=2.38 AND orders_products.products_name='JFC White Shirataki Noodles 16.0 oz'
I did some research on the Arithmetic exception, and it has to do with BigDecimal, usually when the divide function is trying to be used. I know for sure I'm not doing a divide function on any of my BigDecimal order values before I attempt to save. I am doing a couple of multiply functions, however. I've tried following the suggestions here: http://www.jroller.com/nwinkler/entry/the_trouble_with_bigdecimal
They suggest always passing a string to the BigDecimal constructor when creating a new BigDecimal to work with. I get the same error either way.
Is there something on/around line 471 in the saveOrder method that could be helpful in diagnosing why this is happening?
Thanks in advance..