Details
Description
When using the value 1.7978E308 in a JSON file and trying to read the field using the JSON Input step we get the error as below:
2021/07/13 16:10:55 - C:\Users\gs\Downloads\102041SampleTransformation (2).ktr : 102041SampleTransformation - Dispatching started for transformation [C:\Users\gs\Downloads\102041SampleTransformation (2).ktr : 102041SampleTransformation] 2021/07/13 16:10:55 - JSON input.0 - java.lang.Double cannot be cast to java.math.BigDecimal 2021/07/13 16:10:55 - JSON input.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : Error running step! 2021/07/13 16:10:55 - JSON input.0 - Unexpected conversion error while converting value [BigNum1 String(10)] to a BigNumber 2021/07/13 16:10:55 - JSON input.0 - 2021/07/13 16:10:55 - JSON input.0 - BigNum1 String(10) : couldn't convert string value 'Infinity' to a big number. 2021/07/13 16:10:55 - JSON input.0 - at java.lang.Thread.run (Thread.java:748)
I am also attaching the sample transformation NotWorking_With_JSON_Input.ktr NotWorking_With_JSON_Input.ktr
The JSON input step does not pass the expected classes to the JSON parser. This causes the parser to read the number into a java.lang.Double, whereas PDI is expecting a java.math.BigDecimal. Notice the first error: "java.lang.Double cannot be cast to java.math.BigDecimal"
The second error is caused by the fallback to using a String as an intermediate representation. This also fails because a java.lang.Double cannot contain such a big number and comes out as a string containing "Infinity".
PractiTest Integration
Attachments
Issue Links
- is related to
-
PDI-19200 JSON Input: Error occurs when trying to read the largest DOUBLE value 1.79769E+308
-
- Closed
-