The solution to the java.lang.ClassCastException: [B cannot be cast to java.lang.String error in kettle

Problem description: a field queried from the database is json type data, and then an error is reported in the json input step java.lang.ClassCastException: [B cannot be cast to java.lang.String

The cause of the problem: The data queried from the database is not a String type, but a binary byte array, so an error is reported during json parsing.

Solution: In the field selection step, set the field type to String type, and set Binary to Normal to Yes.

 

Similar Posts: