View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002491 | SymmetricDS | Bug | public | 2016-02-08 10:29 | 2016-11-30 17:24 |
Reporter | azarubkin | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | duplicate | ||
Product Version | 3.7.28 | ||||
Target Version | 3.7.37 | Fixed in Version | 3.7.37 | ||
Summary | 0002491: Unable to sync if transformation rules lead to NULL result | ||||
Description | This was initially added as a note to http://www.symmetricds.org/issues/view.php?id=2481. I've found that using transformation rules that lead to NULL result cause SymmetricDS to fail with NullPointerException on any update attempt. No data was changed. The traceback is the same as in issue 0002481. Moreover, the batch was marked as 'OK', what led to loss of information about the change! Since that issue could be unrelated to this one, I'll copy my note from there to here: There were a couple of transformations introduced because of http://www.symmetricds.org/issues/view.php?id=1922. [^] They converted "true" and "false" strings to 1 and 0 integer values. After removing these transformations sync went fine. Since the bug with BIT columns was fixed in 3.6.6, version 3.7.28 should pass correct integer values to client node. But then they get transformed to NULL because that's how transformation rules were written. And finally we get NullPointerException. It's clearly a bug. SymmetricDS should give an intelligible error message at least, if this configuration is erroneous. It should not silently fail. | ||||
Steps To Reproduce | Insert some transformation rules that return NULL as result. In my case it was transforming strings to integer values on an integer field (so no strings like "true" or "false" could be received). See my contents of transformation data in "Additional Information" field. | ||||
Additional Information | Here's data from these tables: /****** Object: Table [symmetricds].[sym_transform_table] Script Date: 02/08/2016 13:05:57 ******/ INSERT [symmetricds].[sym_transform_table] ([transform_id], [source_node_group_id], [target_node_group_id], [transform_point], [source_catalog_name], [source_schema_name], [source_table_name], [target_catalog_name], [target_schema_name], [target_table_name], [update_first], [delete_action], [transform_order], [column_policy], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int', N'main', N'post', N'LOAD', NULL, NULL, N'regimes', NULL, NULL, N'regimes', 0, N'DEL_ROW', 1, N'IMPLIED', NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_table] ([transform_id], [source_node_group_id], [target_node_group_id], [transform_point], [source_catalog_name], [source_schema_name], [source_table_name], [target_catalog_name], [target_schema_name], [target_table_name], [update_first], [delete_action], [transform_order], [column_policy], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int2', N'main', N'post', N'LOAD', NULL, NULL, N'people', NULL, NULL, N'people', 0, N'DEL_ROW', 1, N'IMPLIED', NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_table] ([transform_id], [source_node_group_id], [target_node_group_id], [transform_point], [source_catalog_name], [source_schema_name], [source_table_name], [target_catalog_name], [target_schema_name], [target_table_name], [update_first], [delete_action], [transform_order], [column_policy], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int3', N'main', N'post', N'LOAD', NULL, NULL, N'cards', NULL, NULL, N'cards', 0, N'DEL_ROW', 1, N'IMPLIED', NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_table] ([transform_id], [source_node_group_id], [target_node_group_id], [transform_point], [source_catalog_name], [source_schema_name], [source_table_name], [target_catalog_name], [target_schema_name], [target_table_name], [update_first], [delete_action], [transform_order], [column_policy], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int4', N'main', N'post', N'LOAD', NULL, NULL, N'departments', NULL, NULL, N'departments', 0, N'DEL_ROW', 1, N'IMPLIED', NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_table] ([transform_id], [source_node_group_id], [target_node_group_id], [transform_point], [source_catalog_name], [source_schema_name], [source_table_name], [target_catalog_name], [target_schema_name], [target_table_name], [update_first], [delete_action], [transform_order], [column_policy], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int5', N'main', N'post', N'LOAD', NULL, NULL, N'employees_data', NULL, NULL, N'employees_data', 0, N'DEL_ROW', 1, N'IMPLIED', NULL, NULL, NULL) /****** Object: Table [symmetricds].[sym_transform_column] Script Date: 02/08/2016 13:05:57 ******/ INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int', N'*', N'is_special', N'is_special', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int2', N'*', N'1st_cat_pass', N'1st_cat_pass', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int2', N'*', N'has_bag', N'has_bag', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int2', N'*', N'has_bicycle', N'has_bicycle', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int3', N'*', N'issued', N'issued', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int4', N'*', N'is_leaser', N'is_leaser', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int5', N'*', N'is_boss', N'is_boss', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int5', N'*', N'sp_flag', N'sp_flag', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) INSERT [symmetricds].[sym_transform_column] ([transform_id], [include_on], [target_column_name], [source_column_name], [pk], [transform_type], [transform_expression], [transform_order], [create_time], [last_update_by], [last_update_time]) VALUES (N'bit_value_str_to_int5', N'*', N'timetable_flag', N'timetable_flag', 0, N'copy', N'false=0 true=1', 1, NULL, NULL, NULL) | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-02-08 10:29 | azarubkin | New Issue | |
2016-11-30 17:24 | elong | Note Added: 0000918 | |
2016-11-30 17:24 | elong | Relationship added | duplicate of 0002695 |
2016-11-30 17:24 | elong | Status | new => closed |
2016-11-30 17:24 | elong | Assigned To | => elong |
2016-11-30 17:24 | elong | Resolution | open => duplicate |
2016-11-30 17:24 | elong | Fixed in Version | => 3.7.37 |