Just in case someone stumbles on to this question, maybe this will save some time. The issue was with JRE version. Even though Team City documentation states that it supports Java 8. The issue was caused by the JRE version. Upgrading to JDK (and JRE) 11 fixed the problem with number format conversion.