gabriel-farache opened a new issue, #3667:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3667

   ### Describe the bug
   
   When setting the errorMessage metadata with a (long) message 
(java.lang.IllegalArgumentException - Move2kube (m2k) workflow: 
2c7f93c1-7afc-4aad-a08e-c7886bf5090a has finalized with error. Exit message: 
Error while saving transformation output: Branch 'master' already exists on 
repo ssh://bitbucket.org/gfarache31/m2k-test -- Plan retries: 2) I get a 500 
error in the end state of the workflow and when I check the DI logs I get:
   ```
   ERROR [io.qua.rea.htt.run.ReactiveHttpHandlerBean] 
(vert.x-eventloop-thread-0) Failed to process message.: 
org.hibernate.exception.DataException: could not execute statement [ERROR: 
value too long for type character varying(255)] [update processes set 
business_key=?,created_by=?,end_time=?,endpoint=?,message=?,node_definition_id=?,last_update_time=?,parent_process_instance_id=?,process_id=?,process_name=?,root_process_id=?,root_process_instance_id=?,start_time=?,state=?,updated_by=?,variables=?,version=?
 where id=?]
        at 
org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103)
        at 
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
        at 
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108)
        at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
        at 
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.performNonBatchedMutation(AbstractMutationExecutor.java:108)
   ...
        at java.base/java.lang.Thread.run(Thread.java:840)
   Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type 
character varying(255)
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419)
        at 
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)
        at 
org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:155)
        at 
io.agroal.pool.wrapper.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:90)
        at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:194)
   ```
   Once I (manually) updated the message column of the processes table to 
varchar(2048) , the error is gone
   
   ### Expected behavior
   
   No error
   
   ### Actual behavior
   
   Error when long errorMessage
   
   ### How to Reproduce?
   
   1. Create a workflow with a single `end`state
   2. in this `end` state, set the `errorMessage` metadata with a long string 
with special characters
   3. see the error
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### GraalVM version (if different from Java)
   
   _No response_
   
   ### Kogito version or git rev (or at least Quarkus version if you are using 
Kogito via Quarkus platform BOM)
   
   _No response_
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   Updating the `message` column of the `processes` table to `varchar(2048)`  
solves the issue, maybe it would even be better to set the type to `TEXT` to 
have unlimited ~~powers~~ messages size


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to