- BigDecimal.valueOf(0.000000548) became 0.000000538 in the database
- new BigDecimal("0.000000548") became 0.000000538 in the database
- persisting a plain String "0.000000548" worked fine however
- new BigDecimal("0.000000458") became 0.000000448 in the database
The issue occurred in Oracle's JDBC driver version 10.2.0.1.0. Luckily, after upgrading the drivers to version 10.2.0.4.0 the problems went away.
This is by itself an amazing issue - Just imagine, you were running a larger financial app. You may not even notice this subtle issue until your app is long in production. Oh well...