View Issue Details

IDProjectCategoryView StatusLast Update
0006454SymmetricDSBugpublic2024-06-06 02:24
Reportertangshunbo Assigned To 
Priorityurgent 
Status newResolutionopen 
Product Version3.15.6 
Summary0006454: Error reported when starting sym, RuntimeException: Could not convert a value of ... mapped type BLOB jdbc type MEDIUMTEXT
DescriptionMysql db,symmetricDS table sym_router.

[store-001] - DefaultDatabaseWriter - Failed to process insert event in batch 000--9999 on channel 'config'.
Failed sql was: insert into `jbtonldb`.`sym_router` (`router_id`, `target_catalog_name`, `target_schema_name`, `target_table_name`, `source_node_group_id`, `target_node_group_id`, `router_type`, `router_expression`, `sync_on_update`, `sync_on_insert`, `sync_on_delete`, `use_source_catalog_schema`, `create_time`, `last_update_by`, `last_update_time`, `description`) values ('sale_transaction_corp',null,null,'sale_transaction','sale_transaction','reload','0','0',0,0,null,null,null,null,null,null)null
Failed raw sql was: insert into `jbtonldb`.`sym_router` (`router_id`, `target_catalog_name`, `target_schema_name`, `target_table_name`, `source_node_group_id`, `target_node_group_id`, `router_type`, `router_expression`, `sync_on_update`, `sync_on_insert`, `sync_on_delete`, `use_source_catalog_schema`, `create_time`, `last_update_by`, `last_update_time`, `description`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Failed sql parameters: ['sale_transaction_corp', null, null, 'sale_transaction', 'sale_transaction', 'reload', '0', '0', 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, 0, 1, 1, 0, null, {ts '2024-05-28 14:40:01.867465000'}, null, {ts '2024-05-28 14:40:01.867465000'}, null]
Failed sql parameters types: [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, BLOB, SMALLINT, SMALLINT, SMALLINT, SMALLINT, TIMESTAMP, VARCHAR, TIMESTAMP, BLOB]
Failed row data was: "corp_2_one_store",,,,"corp","store","column","STORE_ID=:EXTERNAL_ID or OLD_STORE_ID=:EXTERNAL_ID","1","1","1","1","2024-05-28 14:40:01.876911000",,"2024-05-28 14:40:01.876911000",
java.lang.RuntimeException: Could not convert a value of STORE_ID=:EXTERNAL_ID or OLD_STORE_ID=:EXTERNAL_ID for column router_expression of mapped type BLOB jdbc type MEDIUMTEXT (-1)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:416)
        at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.execute(DefaultDatabaseWriter.java:1188)
        at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.insert(DefaultDatabaseWriter.java:268)
        at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:185)
        at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
        at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:98)
        at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
        at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:187)
        at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
        at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:160)
        at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:108)
        at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1076)
        at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1052)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: org.apache.commons.codec.DecoderException: Illegal hexadecimal character S at index 0
        at org.apache.commons.codec.binary.Hex.toDigit(Hex.java:369)
        at org.apache.commons.codec.binary.Hex.decodeHex(Hex.java:107)
        at org.apache.commons.codec.binary.Hex.decodeHex(Hex.java:77)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValue(AbstractDatabasePlatform.java:469)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:410)
        ... 16 more
Steps To Reproducerun bin/sym,see log display error:
[store-001] - DefaultDatabaseWriter - Failed to process insert event in batch 000--9999 on channel 'config'.
Failed sql was: insert into `jbtonldb`.`sym_router` (`router_id`, `target_catalog_name`, `target_schema_name`, `target_table_name`, `source_node_group_id`, `target_node_group_id`, `router_type`, `router_expression`, `sync_on_update`, `sync_on_insert`, `sync_on_delete`, `use_source_catalog_schema`, `create_time`, `last_update_by`, `last_update_time`, `description`) values ('sale_transaction_corp',null,null,'sale_transaction','sale_transaction','reload','0','0',0,0,null,null,null,null,null,null)null
Failed raw sql was: insert into `jbtonldb`.`sym_router` (`router_id`, `target_catalog_name`, `target_schema_name`, `target_table_name`, `source_node_group_id`, `target_node_group_id`, `router_type`, `router_expression`, `sync_on_update`, `sync_on_insert`, `sync_on_delete`, `use_source_catalog_schema`, `create_time`, `last_update_by`, `last_update_time`, `description`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Failed sql parameters: ['sale_transaction_corp', null, null, 'sale_transaction', 'sale_transaction', 'reload', '0', '0', 0, 0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, 0, 1, 1, 0, null, {ts '2024-05-28 14:40:01.867465000'}, null, {ts '2024-05-28 14:40:01.867465000'}, null]
Failed sql parameters types: [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, BLOB, SMALLINT, SMALLINT, SMALLINT, SMALLINT, TIMESTAMP, VARCHAR, TIMESTAMP, BLOB]
Failed row data was: "corp_2_one_store",,,,"corp","store","column","STORE_ID=:EXTERNAL_ID or OLD_STORE_ID=:EXTERNAL_ID","1","1","1","1","2024-05-28 14:40:01.876911000",,"2024-05-28 14:40:01.876911000",
java.lang.RuntimeException: Could not convert a value of STORE_ID=:EXTERNAL_ID or OLD_STORE_ID=:EXTERNAL_ID for column router_expression of mapped type BLOB jdbc type MEDIUMTEXT (-1)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:416)
        at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.execute(DefaultDatabaseWriter.java:1188)
        at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.insert(DefaultDatabaseWriter.java:268)
        at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:185)
        at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
        at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:98)
        at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:62)
        at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:187)
        at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
        at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:160)
        at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:108)
        at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1076)
        at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1052)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: org.apache.commons.codec.DecoderException: Illegal hexadecimal character S at index 0
        at org.apache.commons.codec.binary.Hex.toDigit(Hex.java:369)
        at org.apache.commons.codec.binary.Hex.decodeHex(Hex.java:107)
        at org.apache.commons.codec.binary.Hex.decodeHex(Hex.java:77)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValue(AbstractDatabasePlatform.java:469)
        at org.jumpmind.db.platform.AbstractDatabasePlatform.getObjectValues(AbstractDatabasePlatform.java:410)
        ... 16 more
Tagsdata type, sym/sym_service

Activities

tangshunbo

2024-05-29 03:48

reporter  

tangshunbo

2024-05-29 07:12

reporter   ~0002453

very worried,very worried,very worried !!!

jvanmeter

2024-05-29 17:23

developer   ~0002454

Can you run the following and post the results:

Select @@character_set_database

Do you have any parameters set such as the db.read.strings.as.bytes parameter?

tangshunbo

2024-05-30 01:49

reporter   ~0002455

mysql> SHOW VARIABLES LIKE 'character_set_database';
+------------------------+---------+
| Variable_name | Value |
+------------------------+---------+
| character_set_database | utf8mb4 |
+------------------------+---------+
1 row in set (0.00 sec)

2、Not set the db.read.strings.as.bytes parameter, it's default value is false.

tangshunbo

2024-05-30 02:10

reporter   ~0002456

This issue seems to have occurred before, with the number 0002964.

elong

2024-05-30 11:45

developer   ~0002457

Can you run the following and post the results:

show table status like 'sym_router';

We'd like to see the table's collation.

tangshunbo

2024-05-31 01:29

reporter   ~0002458

mysql> desc sym_router;
+---------------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------+--------------+------+-----+---------+-------+
| router_id | varchar(50) | NO | PRI | NULL | |
| target_catalog_name | varchar(255) | YES | | NULL | |
| target_schema_name | varchar(255) | YES | | NULL | |
| target_table_name | varchar(255) | YES | | NULL | |
| source_node_group_id | varchar(50) | NO | MUL | NULL | |
| target_node_group_id | varchar(50) | NO | | NULL | |
| router_type | varchar(50) | NO | | default | |
| router_expression | mediumtext | YES | | NULL | |
| sync_on_update | smallint | NO | | 1 | |
| sync_on_insert | smallint | NO | | 1 | |
| sync_on_delete | smallint | NO | | 1 | |
| use_source_catalog_schema | smallint | NO | | 1 | |
| create_time | datetime | NO | | NULL | |
| last_update_by | varchar(50) | YES | | NULL | |
| last_update_time | datetime | NO | | NULL | |
| description | mediumtext | YES | | NULL | |
+---------------------------+--------------+------+-----+---------+-------+
16 rows in set (0.00 sec)


mysql> SHOW TABLE STATUS LIKE 'sym_router';
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+----------------+---------+
| sym_router | InnoDB | 10 | Dynamic | 3 | 5461 | 16384 | 0 | 16384 | 0 | NULL | 2024-05-29 11:22:28 | NULL | NULL | utf8mb4_bin | NULL | | |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------+----------+----------------+---------+
1 row in set (0.00 sec)
image.png (129,348 bytes)   
image.png (129,348 bytes)   

cquamme

2024-06-05 17:37

developer   ~0002460

The SymmetricDS tables need to be in the below collation:

alter table <some_table> convert to character set utf8mb4 collate utf8mb4_unicode_ci;

You could create a DB for SymmetricDS with this collation and install SymmetricDS there.

tangshunbo

2024-06-06 02:24

reporter   ~0002461

Modified the character and collate set or still reporting an error.

-------------------------------------------------------------------------
mysql> SHOW TABLE STATUS LIKE 'sym_router';
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
| sym_router | InnoDB | 10 | Dynamic | 0 | 0 | 16384 | 0 | 16384 | 0 | NULL | 2024-06-06 10:00:56 | NULL | NULL | utf8mb4_unicode_ci | NULL | | |
+------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+
1 row in set (0.01 sec)
image-2.png (262,090 bytes)   
image-2.png (262,090 bytes)   

Issue History

Date Modified Username Field Change
2024-05-29 03:48 tangshunbo New Issue
2024-05-29 03:48 tangshunbo Tag Attached: data type
2024-05-29 03:48 tangshunbo Tag Attached: sym/sym_service
2024-05-29 03:48 tangshunbo File Added: 微信截图_20240529114543.png
2024-05-29 07:12 tangshunbo Note Added: 0002453
2024-05-29 17:23 jvanmeter Note Added: 0002454
2024-05-30 01:49 tangshunbo Note Added: 0002455
2024-05-30 02:10 tangshunbo Note Added: 0002456
2024-05-30 11:45 elong Note Added: 0002457
2024-05-31 01:29 tangshunbo Note Added: 0002458
2024-05-31 01:29 tangshunbo File Added: image.png
2024-06-05 17:37 cquamme Note Added: 0002460
2024-06-05 17:37 cquamme Status new => feedback
2024-06-06 02:24 tangshunbo Note Added: 0002461
2024-06-06 02:24 tangshunbo File Added: image-2.png
2024-06-06 02:24 tangshunbo Status feedback => new