Specify rounding mode to handle non-exact results.
When dividing BigDecimal, specify a rounding mode to handle cases where results aren't exact. This avoids ArithmeticException. For example, dividing 1 by 3 with BigDecimal requires a rounding mode for a finite result.
Additional Notes
BigDecimal Arithmetic Operations and Rounding Modes?