View Issue Details

IDProjectCategoryView StatusLast Update
0002837SymmetricDSBugpublic2018-10-17 19:19
Reporterdaorti@gmail.com Assigned To 
Prioritynormal 
Status closedResolutionunable to reproduce 
Product Version3.8.4 
Summary0002837: Null pointer Exception when inserting or updating a record when auditing is enabled
DescriptionHello

I cannot get table auditing to work. Every time I insert a register I get a repeated message that shows as long as the associated router trigger is on. I have tried with postgressql 9.5 and oracle 11 as background databases and in both cases the problem persists upon the update or insertion of a row of data.

2016-09-29 18:01:06,929 ERROR [ENG_POSTGRES] [RouterService] [ENG_POSTGRES-job-1] Failed to route data: 11 for table: T_CSBE_EVENT.
Failed pk data was: "54455354303034000001525F19BB74"
Failed row data was: "54455354303034000001525F19B","0000000000TEST005","2016-01-20 13:54:28.572000","2016-01-20 13:54:28.583000",,
Failed old data was: "54455354303034000001525F19BB","0000000000TEST004","2016-01-20 13:54:28.572000","2016-01-20 13:54:28.583000",,

2016-09-29 18:01:06,932 ERROR [ENG_POSTGRES] [RouterService] [ENG_POSTGRES-job-1] Failed to route and batch data on 'CH_AUD_CSBE' channel StackTraceKey.init [NullPointerException:121942975]
java.lang.NullPointerException
    at org.jumpmind.db.platform.postgresql.PostgreSqlDmlStatement.appendColumnEquals(PostgreSqlDmlStatement.java:138)
    at org.jumpmind.db.sql.DmlStatement.appendColumnsEquals(DmlStatement.java:278)
    at org.jumpmind.db.sql.DmlStatement.appendColumnsEquals(DmlStatement.java:265)
    at org.jumpmind.db.platform.postgresql.PostgreSqlDmlStatement.buildInsertSql(PostgreSqlDmlStatement.java:55)
    

    My setup is the following
    
    Two nodes: 000 (Postgres), 111(oracle)
    Three groups: GR_ORA, GR_POSTGRES, GR_LOCAL (USed for authentication)
    The audit channel: CH_AUD_CSBE
    The Node group link for the auditing: Between GR_POSTGRES and GR_LOCAL of data event action T
    
    
    Full stack trace
    
    2016-09-29 18:01:06,932 ERROR [ENG_POSTGRES] [RouterService] [ENG_POSTGRES-job-1] Failed to route and batch data on 'CH_AUD_CSBE' channel StackTraceKey.init [NullPointerException:121942975]
java.lang.NullPointerException
    at org.jumpmind.db.platform.postgresql.PostgreSqlDmlStatement.appendColumnEquals(PostgreSqlDmlStatement.java:138)
    at org.jumpmind.db.sql.DmlStatement.appendColumnsEquals(DmlStatement.java:278)
    at org.jumpmind.db.sql.DmlStatement.appendColumnsEquals(DmlStatement.java:265)
    at org.jumpmind.db.platform.postgresql.PostgreSqlDmlStatement.buildInsertSql(PostgreSqlDmlStatement.java:55)
    at org.jumpmind.db.sql.DmlStatement.init(DmlStatement.java:122)
    at org.jumpmind.db.sql.DmlStatement.<init>(DmlStatement.java:80)
    at org.jumpmind.db.platform.postgresql.PostgreSqlDmlStatement.<init>(PostgreSqlDmlStatement.java:36)
    at org.jumpmind.db.platform.DmlStatementFactory.createDmlStatement(DmlStatementFactory.java:70)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.createDmlStatement(AbstractDatabasePlatform.java:125)
    at org.jumpmind.db.platform.AbstractDatabasePlatform.createDmlStatement(AbstractDatabasePlatform.java:118)
    at org.jumpmind.symmetric.route.AuditTableDataRouter.routeToNodes(AuditTableDataRouter.java:108)
    at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:917)
    at org.jumpmind.symmetric.service.impl.RouterService.selectDataAndRoute(RouterService.java:835)
    at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(RouterService.java:634)
    at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(RouterService.java:427)
    at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:201)
    at org.jumpmind.symmetric.job.RouterJob.doJob(RouterJob.java:40)
    at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:180)
    at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:224)
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Steps To ReproduceInsert or update a record on the observed table
Additional InformationAttached the Symmetric DS configuration
TagsNo tags attached.

Activities

daorti@gmail.com

2016-09-29 16:55

reporter  

config.txt (4,648 bytes)   
INSERT INTO r6174.sym_node
(node_id, node_group_id, external_id, sync_enabled, sync_url, schema_version, symmetric_version, database_type, database_version, heartbeat_time, timezone_offset, batch_to_send_count, batch_in_error_count, created_at_node_id, deployment_type)
VALUES('000', 'GR_POSTGRES', '000', 1, 'http://localhost:31415/sync/ENG_POSTGRES', '?', '3.8.4', 'PostgreSQL', '9.5', TO_DATE('2016-09-26 13:00:17','YYYY-MM-DD HH24:MI:SS'), '+02:00', -1, -1, NULL, 'server');
INSERT INTO r6174.sym_node
(node_id, node_group_id, external_id, sync_enabled, sync_url, schema_version, symmetric_version, database_type, database_version, heartbeat_time, timezone_offset, batch_to_send_count, batch_in_error_count, created_at_node_id, deployment_type)
VALUES('111', 'GR_ORA', '111', 1, 'http://localhost:31415/sync/ENG_ORACLE', '?', '3.8.4', 'Oracle', '11.2', TO_DATE('2016-09-26 10:42:30','YYYY-MM-DD HH24:MI:SS'), '+02:00', -1, -1, NULL, 'server');


INSERT INTO r6174.sym_node_group
(node_group_id, description, create_time, last_update_by, last_update_time)
VALUES('GR_LOCAL', NULL, NULL, NULL, NULL);
INSERT INTO r6174.sym_node_group
(node_group_id, description, create_time, last_update_by, last_update_time)
VALUES('GR_POSTGRES', NULL, NULL, NULL, NULL);
INSERT INTO r6174.sym_node_group
(node_group_id, description, create_time, last_update_by, last_update_time)
VALUES('GR_ORA', NULL, NULL, NULL, NULL);

INSERT INTO r6174.sym_node_group_link
(source_node_group_id, target_node_group_id, data_event_action, sync_config_enabled, create_time, last_update_by, last_update_time)
VALUES('GR_POSTGRES', 'GR_LOCAL', 'R', 1, TO_DATE('2016-09-29 14:50:18','YYYY-MM-DD HH24:MI:SS'), '111
', TO_DATE('2016-09-29 14:50:27','YYYY-MM-DD HH24:MI:SS'));
INSERT INTO r6174.sym_node_group_link
(source_node_group_id, target_node_group_id, data_event_action, sync_config_enabled, create_time, last_update_by, last_update_time)
VALUES('GR_ORA', 'GR_POSTGRES', 'P', 1, NULL, NULL, NULL);

INSERT INTO r6174.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)
VALUES('AUD_EVENT', NULL, NULL, NULL, 'GR_POSTGRES', 'GR_LOCAL', 'audit', NULL, 1, 1, 1, 1, TO_DATE('2016-09-29 16:13:34','YYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2016-09-29 16:13:37','YYYY-MM-DD HH24:MI:SS'));


INSERT INTO r6174.sym_channel
(channel_id, processing_order, max_batch_size, max_batch_to_send, max_data_to_route, extract_period_millis, enabled, use_old_data_to_route, use_row_data_to_route, use_pk_data_to_route, reload_flag, file_sync_flag, contains_big_lob, batch_algorithm, data_loader_type, description, queue, max_network_kbps, create_time, last_update_by, last_update_time)
VALUES('CH_AUD_CSBE', 5, 10000, 10000, 100000, 0, 1, 1, 1, 1, 1, 0, 1, 'default', 'default', NULL, 'default', 0.000, TO_DATE('2016-09-29 15:54:32','YYYY-MM-DD HH24:MI:SS'), '111', TO_DATE('2016-09-29 15:54:36','YYYY-MM-DD HH24:MI:SS'));

INSERT INTO r6174.sym_trigger
(trigger_id, source_catalog_name, source_schema_name, source_table_name, channel_id, reload_channel_id, sync_on_update, sync_on_insert, sync_on_delete, sync_on_incoming_batch, name_for_update_trigger, name_for_insert_trigger, name_for_delete_trigger, sync_on_update_condition, sync_on_insert_condition, sync_on_delete_condition, custom_before_update_text, custom_before_insert_text, custom_before_delete_text, custom_on_update_text, custom_on_insert_text, custom_on_delete_text, external_select, tx_id_expression, channel_expression, excluded_column_names, included_column_names, sync_key_names, use_stream_lobs, use_capture_lobs, use_capture_old_data, use_handle_key_updates, create_time, last_update_by, last_update_time)
VALUES('TR_AU_CSBE_EVENT', NULL, NULL, 'T_CSBE_EVENT', 'CH_AUD_CSBE', 'reload', 1, 1, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, 0, TO_DATE('2016-09-29 16:11:44','YYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2016-09-29 16:11:47','YYYY-MM-DD HH24:MI:SS'));

INSERT INTO r6174.sym_trigger_router
(trigger_id, router_id, enabled, initial_load_order, initial_load_select, initial_load_delete_stmt, initial_load_batch_count, ping_back_enabled, create_time, last_update_by, last_update_time)
VALUES('TR_AU_CSBE_EVENT', 'AUD_EVENT', 1, 100, NULL, NULL, 1, 0, TO_DATE('2016-09-29 16:15:17','YYYY-MM-DD HH24:MI:SS'), NULL, TO_DATE('2016-09-29 16:15:22','YYYY-MM-DD HH24:MI:SS'));
config.txt (4,648 bytes)   

admin

2016-09-30 14:28

administrator   ~0000880

Re-opening. Was accidentally closed when performing the release.

hanes

2018-10-17 19:19

developer   ~0001287

Unable to recreate the issue. Did have to add one additional sym_node_group_link to the configuration to allow node to register.

Issue History

Date Modified Username Field Change
2016-09-29 16:55 daorti@gmail.com New Issue
2016-09-29 16:55 daorti@gmail.com File Added: config.txt
2016-09-30 01:01 admin Status new => closed
2016-09-30 14:28 admin Status closed => new
2016-09-30 14:28 admin Note Added: 0000880
2018-10-17 19:19 hanes Status new => closed
2018-10-17 19:19 hanes Resolution open => unable to reproduce
2018-10-17 19:19 hanes Note Added: 0001287