0

I got an error when running flowable for couple of days.

 Exception occurred during processing of request. BreadcrumbID:|sJdgH.q/WQp 
 org.apache.ibatis.exceptions.PersistenceException: 
 ### Error querying database. 
 Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'BYTES_' from result set. 
 Cause: org.postgresql.util.PSQLException: Bad value for type long : SOME BYTEARRAY.
 .
 .
 .
 .
 .
 at org.postgresql.jdbc.PgResultSet.toLong(PgResultSet.java:2873) ~[postgresql-42.2.5.jar!/:42.2.5] 
 at org.postgresql.jdbc.PgResultSet.getLong(PgResultSet.java:2099) ~[postgresql-42.2.5.jar!/:42.2.5] 
 at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:419) ~[postgresql-42.2.5.jar!/:42.2.5] 
 at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:406) ~[postgresql-42.2.5.jar!/:42.2.5] 
 at com.zaxxer.hikari.pool.HikariProxyResultSet.getBlob(HikariProxyResultSet.java) ~[HikariCP-3.2.0.jar!/:?] 
 at org.apache.ibatis.type.BlobTypeHandler.getNullableResult(BlobTypeHandler.java:40) ~[mybatis-3.4.6.jar!/:3.4.6] 
 at org.apache.ibatis.type.BlobTypeHandler.getNullableResult(BlobTypeHandler.java:28) ~[mybatis-3.4.6.jar!/:3.4.6] 
 at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:66) ~[mybatis-3.4.6.jar!/:3.4.6]
 ...

This happens when trying to create a new process instance, and it is querying the ACT_GE_BYTEARRAY table and trying to read the bytes_ column from the result set.

Looks like it is trying to create a BLOB object while the column type is bytea, since the type handler is BlobTypeHandler.

Anyone ever experience this ? Or know why it can use the wrong type to read the bytea column ?

Note: *Restarting will bring it to normal.

dk_016
  • 36
  • 1
  • 5
  • What do you mean by 'flowable load'? We may also need more info about the note (i.e. 'Restarting will bring it to normal'). For a `BYTEA` data type, you should use `ByteArrayTypeHandler` (which is the default). – ave Jul 27 '21 at 13:02
  • Are you trying to retrieve the content of the `BYTEA` column as a binary stream rather than storing the entire content into a byte array? Then you can't To get the data as a `java.sql.Blob`, the column type must be `OID`. This [answer](https://stackoverflow.com/a/2070376/1261766) might be helpful. – ave Jul 27 '21 at 18:44
  • Also see the [official doc](https://jdbc.postgresql.org/documentation/head/binary-data.html). – ave Jul 27 '21 at 22:11

0 Answers0