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:
- [Ljava.lang.String; cannot be cast to java.lang.String [How to Solve]
- Java – Convert bytes to unsigned bytes
- [Solved] net.sf.json.JSONException: java.lang.ClassCastException: JSON keys must be strings.
- [Solved] mapper.xml Error: java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String; is abstract,
- Get the time value from the database and report an error: Java sql. Timestamp cannot be cast to java. lang.Long
- java.sql.SQLException: Fail to convert to internal
- Postman passing Josn field error: Cannot deserialize instance of `java.util.ArrayList` out of VALUE_STRING token
- [Solved] Mybatis Mapping Error: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘id’ in ‘class java.lang.String
- [Solved] Redis Operation exception: java.lang.ClassCastException: java.lang.Long cannot be cast to [B
- [Solved] org.springframework.dao.DataIntegrityViolationException: Error attempting to get column…