pefernan opened a new issue, #2284:
URL: https://github.com/apache/incubator-kie-issues/issues/2284

   We noticed a regression of 
https://github.com/apache/incubator-kie-issues/issues/1607 when using 
data-index jpa addon in the process-compact-architecture example in 
**postgresql** **WITHOUT** jobs addon. In this case the error was happening 
when registering the process definitions during startup:
   
   ```
   org.hibernate.exception.SQLGrammarException: could not execute statement 
[ERROR: column "metadata" is of type jsonb but expression is of type character 
varying                                       
     Hint: You will need to rewrite or cast the expression.                     
                                                                                
                                                    
     Position: 60] [update definitions set 
description=?,endpoint=?,metadata=?,name=?,source=?,type=? where id=? and 
version=?]                                                                      
               
           at 
org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:63)
                                                                                
               
           at 
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:34)
                                                                                
         
           at 
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:115)
                                                                                
                                 
           at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:193)
                                                                                
                    
           at 
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.performNonBatchedMutation(AbstractMutationExecutor.java:148)
                                                                     
           at 
org.hibernate.engine.jdbc.mutation.internal.MutationExecutorSingleNonBatched.performNonBatchedOperations(MutationExecutorSingleNonBatched.java:53)
                                                    
           at 
org.hibernate.engine.jdbc.mutation.internal.AbstractMutationExecutor.execute(AbstractMutationExecutor.java:66)
                                                                                
        
           at 
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.doStaticUpdate(UpdateCoordinatorStandard.java:774)
                                                                                
  
           at 
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.performUpdate(UpdateCoordinatorStandard.java:317)
                                                                                
   
           at 
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.update(UpdateCoordinatorStandard.java:235)
                                                                                
          
           at 
org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:172)
                                                                                
                                 
           at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:646)       
                                                                                
                                      
           at 
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:513)       
                                                                                
                                      
           at 
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:378)
                                                                                
  
           at 
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
                                                                                
                     
           at 
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:140)
                                                                                
  
           at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1447) 
                                                                                
                                                    
           at 
org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:488)           
                                                                                
                                      
           at 
org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2325)
                                                                                
                            
           at 
org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2033)
                                                                                
                                 
           at 
org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:394)
                                                                                
      
           at 
org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:328)
                                                        
           at 
org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:39)
 
           at 
org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:33)
                                                 
           at 
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:52)
                                                                                
  
           at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhainator.java:348)
                                                                                
                         
           at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:66)
                                                                                
                                
           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:135)
           at 
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1307)
           ... 47 more
   Caused by: org.postgresql.util.PSQLException: ERROR: column "metadata" is of 
type jsonb but expression is of type character varying                          
                                                    
     Hint: You will need to rewrite or cast the expression.                     
                                                                                
                                                    
     Position: 60                                                               
                                                                                
                                                    
           at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2736)
                                                                                
                            
           at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2421)
                                                                                
                                  
           at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)    
                                                                                
                                      
           at 
org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:525)           
                                                                                
                                      
           at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:435)     
                                                                                
                                                    
           at 
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:196)
                                                                                
                                
           at 
org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:157)
                                                                                
                                   
           at 
io.agroal.pool.wrapper.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:90)
                                                                                
                       
           at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:190)
                                                                                
                    
           ... 72 more          
   ```
   
   Data Index Quarkus JPA addons are lacking of the `stringtype=unspecified` 
jdbc config that makes our jpa storage correctly map with postgresql jsonb 
columns.
   
   ```
   quarkus.datasource.jdbc.additional-jdbc-properties.stringtype=unspecified
   ```
   
   Data Index JPA addon was `inheriting` this config from persistence-commons 
modules and after the refactor this dependency got lost. We must restore the 
config in 
http://github.com/apache/incubator-kie-kogito-apps/tree/main/data-index/data-index-quarkus/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-jpa
   


-- 
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