beanww opened a new issue, #7661:
URL: https://github.com/apache/incubator-seata/issues/7661

   ### Check Ahead
   
   - [x] I have searched the [issues](https://github.com/seata/seata/issues) of 
this repository and believe that this is not a duplicate.
   
   - [ ] I am willing to try to fix this bug myself.
   
   
   ### Ⅰ. Issue Description
   
   seata 2.1 client, seata 2.3 server
   
   exception occurs when globaltransaction rollback:
   
   2025-09-25 13:30:32.141 |  INFO 29608 | 
rpcDispatch_RMROLE_1_19_32 [TID: N/A] 
org.apache.seata.rm.AbstractRMHandler    | Branch Rollbacked 
result: PhaseTwo_RollbackFailed_Retryable
   2025-09-25 13:30:33.137 |  INFO 29608 | 
rpcDispatch_RMROLE_1_20_32 [TID: N/A] 
o.a.s.c.r.p.c.RmBranchRollbackProcessor  | rm handle branch 
rollback process:BranchRollbackRequest{xid='xxxx:3261279418629289337', 
branchId=3261279418629289338, branchType=AT, 
resourceId='jdbc:postgresql://xxxxx', applicationData='null'}
   2025-09-25 13:30:33.137 |  INFO 29608 | 
rpcDispatch_RMROLE_1_20_32 [TID: N/A] 
org.apache.seata.rm.AbstractRMHandler    | Branch Rollbacking: 
xxxx:3261279418629289337 3261279418629289338 
jdbc:postgresql://xxxx:5432/db_sys_dev
   2025-09-25 13:30:33.139 | ERROR 29608 | 
rpcDispatch_RMROLE_1_20_32 [TID: N/A] 
o.a.s.r.d.u.parser.JacksonUndoLogParser  | json decode exception, 
Cannot deserialize value of type `java.lang.Long` from Array value (token 
`JsonToken.START_ARRAY`)
    at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` 
disabled); line: 1, column: 1159] (through reference chain: 
org.apache.seata.rm.datasource.undo.BranchUndoLog["sqlUndoLogs"]->java.util.ArrayList[0]->org.apache.seata.rm.datasource.undo.SQLUndoLog["beforeImage"]->org.apache.seata.rm.datasource.sql.struct.TableRecords["rows"]->java.util.ArrayList[0]->org.apache.seata.rm.datasource.sql.struct.Row["fields"]->java.util.ArrayList[2]->org.apache.seata.rm.datasource.sql.struct.Field["value"]->org.apache.seata.rm.datasource.sql.serial.SerialArray["elements"]->java.lang.Object[][0])
   com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot 
deserialize value of type `java.lang.Long` from Array value (token 
`JsonToken.START_ARRAY`)
    at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` 
disabled); line: 1, column: 1159] (through reference chain: 
org.apache.seata.rm.datasource.undo.BranchUndoLog["sqlUndoLogs"]->java.util.ArrayList[0]->org.apache.seata.rm.datasource.undo.SQLUndoLog["beforeImage"]->org.apache.seata.rm.datasource.sql.struct.TableRecords["rows"]->java.util.ArrayList[0]->org.apache.seata.rm.datasource.sql.struct.Row["fields"]->java.util.ArrayList[2]->org.apache.seata.rm.datasource.sql.struct.Field["value"]->org.apache.seata.rm.datasource.sql.serial.SerialArray["elements"]->java.lang.Object[][0])
        at 
com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
        at 
com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1767)
        at 
com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1541)
   
   
   undolog rollback info:
   
   
{"@class":"org.apache.seata.rm.datasource.undo.BranchUndoLog","xid":"192.168.100.81:8091:3261279418629289337","branchId":3261279418629289338,"sqlUndoLogs":["java.util.ArrayList",[{"@class":"org.apache.seata.rm.datasource.undo.SQLUndoLog","sqlType":"UPDATE","tableName":"system_users","beforeImage":{"@class":"org.apache.seata.rm.datasource.sql.struct.TableRecords","tableName":"system_users","rows":["java.util.ArrayList",[{"@class":"org.apache.seata.rm.datasource.sql.struct.Row","fields":["java.util.ArrayList",[{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"available_site_ids","keyType":"NULL","type":2003,"value":{"@class":"org.apache.seata.rm.datasource.sql.serial.SerialArray","elements":["[Ljava.lang.Long;",[]],"baseType":-5,"baseTypeName":"int8","array":["[Ljava.lang.Long;",[]],"resultSet":null}},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"avatar","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struc
 
t.Field","name":"dept_ids","keyType":"NULL","type":2003,"value":{"@class":"org.apache.seata.rm.datasource.sql.serial.SerialArray","elements":["[Ljava.lang.Long;",[["java.lang.Long",10]]],"baseType":-5,"baseTypeName":"int8","array":["[Ljava.lang.Long;",[10]],"resultSet":null}},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"email","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"id","keyType":"PRIMARY_KEY","type":-5,"value":["java.lang.Long",1956302537468411905]},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"mobile","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"nickname","keyType":"NULL","type":12,"value":"keithxxxxxxxxxxxx"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"post_ids","keyType":"NULL","type":12,"value":"[1]"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"purpose","keyTy
 
pe":"NULL","type":5,"value":1},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"remark","keyType":"NULL","type":12,"value":"123"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"sex","keyType":"NULL","type":5,"value":0},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"status","keyType":"NULL","type":5,"value":0},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"update_time","keyType":"NULL","type":93,"value":["java.sql.Timestamp",1758766045000]},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"updater","keyType":"NULL","type":12,"value":"1"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"user_type_id","keyType":"NULL","type":4,"value":2},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"username","keyType":"NULL","type":12,"value":"keithTestadmin"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"valid_time","keyType":"NULL","type":
 
93,"value":["java.sql.Timestamp",1755253777649]}]]}]]},"afterImage":{"@class":"org.apache.seata.rm.datasource.sql.struct.TableRecords","tableName":"system_users","rows":["java.util.ArrayList",[{"@class":"org.apache.seata.rm.datasource.sql.struct.Row","fields":["java.util.ArrayList",[{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"available_site_ids","keyType":"NULL","type":2003,"value":{"@class":"org.apache.seata.rm.datasource.sql.serial.SerialArray","elements":["[Ljava.lang.Long;",[]],"baseType":-5,"baseTypeName":"int8","array":["[Ljava.lang.Long;",[]],"resultSet":null}},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"avatar","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"dept_ids","keyType":"NULL","type":2003,"value":{"@class":"org.apache.seata.rm.datasource.sql.serial.SerialArray","elements":["[Ljava.lang.Long;",[["java.lang.Long",10]]],"baseType":-5,"baseTypeName":"int8","array":[
 
"[Ljava.lang.Long;",[10]],"resultSet":null}},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"email","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"id","keyType":"PRIMARY_KEY","type":-5,"value":["java.lang.Long",1956302537468411905]},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"mobile","keyType":"NULL","type":12,"value":""},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"nickname","keyType":"NULL","type":12,"value":"keithxxxxxxxxxxxx"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"post_ids","keyType":"NULL","type":12,"value":"[1]"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"purpose","keyType":"NULL","type":5,"value":1},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"remark","keyType":"NULL","type":12,"value":"1234"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"sex","keyType"
 
:"NULL","type":5,"value":0},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"status","keyType":"NULL","type":5,"value":0},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"update_time","keyType":"NULL","type":93,"value":["java.sql.Timestamp",1758778122000]},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"updater","keyType":"NULL","type":12,"value":"1"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"user_type_id","keyType":"NULL","type":4,"value":2},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"username","keyType":"NULL","type":12,"value":"keithTestadmin"},{"@class":"org.apache.seata.rm.datasource.sql.struct.Field","name":"valid_time","keyType":"NULL","type":93,"value":["java.sql.Timestamp",1755253777649]}]]}]]}}]]}
   
   
   ### Ⅱ. Describe what happened
   
   globaltransaction service failed, and seata rollback exception
   
   ### Ⅲ. Describe what you expected to happen
   
   seata rollback success
   
   ### Ⅳ. How to reproduce it (as minimally and precisely as possible)
   
   postgres table with array type field, and when service failed trigger seata 
rollback, seata will throw json deser exception
   CREATE TABLE public.system_users (
        id bigserial NOT NULL,
        username varchar(60) NOT NULL,
        dept_ids _int8 NULL,    <<-----this is an array type field
        CONSTRAINT pk_system_users PRIMARY KEY (id)
   );
   
   ### Ⅴ. Anything else we need to know?
   
   _No response_
   
   ### Ⅵ. Environment
   
   jdk 21
   seata client 2.1
   seata server 2.3
   db: postgres 15
   os: windows10


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