View Issue Details

IDProjectCategoryView StatusLast Update
0003529SymmetricDSImprovementpublic2018-10-03 13:48
Reporterddlg_2Assigned To 
Priorityhigh 
Status closedResolutionduplicate 
Product Version3.9.6 
Target VersionFixed in Version 
Summary0003529: Symmetric needs to insert successfully null value into target_node_database_tables when initial load firstly
DescriptionHi

In the case of source_node_database_tables do not have any primary keys and some fields of the source_node_database_tables are empty, target_node_database_tables are created successfully when initial load firstly, but Symmetric can not insert automatically values into target_node_database_tables.

part of target_node symmetric.log:

2018-04-18 15:37:39,020 INFO [server-010] [DefaultDatabaseWriter] [server-010-dataloader-1] About to create table using the following definition: <?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="dataextractor">
    <table name="JC_CKDW">
        <column name="CKDW_ID" primaryKey="true" type="DECIMAL" size="10">
            <platform-column name="oracle" type="NUMBER" size="10"/>
        </column>
        <column name="CKDW_DZH" primaryKey="true" type="VARCHAR" size="50">
            <platform-column name="oracle" type="VARCHAR2" size="50"/>
        </column>
        <column name="CKDW_DZM" primaryKey="true" type="VARCHAR" size="150">
            <platform-column name="oracle" type="VARCHAR2" size="150"/>
        </column>
        <column name="CKDW_RYH" primaryKey="true" type="VARCHAR" size="50">
            <platform-column name="oracle" type="VARCHAR2" size="50"/>
        </column>
        <column name="CKDW_RYM" primaryKey="true" type="VARCHAR" size="50">
            <platform-column name="oracle" type="VARCHAR2" size="50"/>
        </column>
        <column name="CKDW_TIME" primaryKey="true" type="TIMESTAMP" size="7">
            <platform-column name="oracle" type="DATE" size="7"/>
        </column>
        <column name="CKDW_DWMC" primaryKey="true" type="VARCHAR" size="50">
            <platform-column name="oracle" type="VARCHAR2" size="50"/>
        </column>
        <column name="CKDW_TEMP1" primaryKey="true" type="VARCHAR" size="10">
            <platform-column name="oracle" type="VARCHAR2" size="10"/>
        </column>
        <column name="CKDW_TEMP2" primaryKey="true" type="VARCHAR" size="10">
            <platform-column name="oracle" type="VARCHAR2" size="10"/>
        </column>
        <column name="CKDW_TEMP3" primaryKey="true" type="VARCHAR" size="10">
            <platform-column name="oracle" type="VARCHAR2" size="10"/>
        </column>
        <column name="CKDW_BS" primaryKey="true" type="VARCHAR" size="10">
            <platform-column name="oracle" type="VARCHAR2" size="10"/>
        </column>
    </table>
</database>

2018-04-18 15:37:41,006 INFO [server-010] [DefaultDatabaseWriter] [server-010-dataloader-2] Failed to process insert event in batch 001-12 on channel 'reload'.
Failed sql was: insert into `test`.`jc_ckdd` (`ckdd_id`, `ckdd_bh`, `ckdd_dd`, `ckdd_cjsj`, `ckdd_by1`, `id`) values (?,?,?,?,?,?)
Failed sql parameters: ['1', '0021001AD6C3', '??13#???', {ts '2018-01-28 16:09:43.000'}, '7896', null]
Failed sql parameters types: [VARCHAR, VARCHAR, VARCHAR, TIMESTAMP, VARCHAR, BIGINT]
Failed sql state and code: 23000 (1048)
Failed row data was: "1","0021001AD6C3","??13#???","2018-01-28 16:09:43","7896",
 StackTraceKey.init [SqlException:2774797739]
org.jumpmind.db.sql.SqlException: Column 'id' cannot be null
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:300)
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:291)
    at org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:478)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.execute(DefaultDatabaseWriter.java:865)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.insert(DefaultDatabaseWriter.java:202)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:191)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:206)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:210)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:177)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:123)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$1.call(DataLoaderService.java:1029)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$1.call(DataLoaderService.java:991)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

part of source_node symmetric.log:

2018-04-18 15:37:36,668 INFO [client1-001] [PushService] [client1-001-push-default-10] Push data sent to server:010:010
2018-04-18 15:37:40,139 INFO [client1-001] [PushService] [client1-001-push-default-10] Pushed data to node server:010:010. 6 data and 6 batches were processed. (sym_node_security, sym_node, jc_lfyhis, jc_ckdd, jc_lfy, jc_ckdw)
2018-04-18 15:37:40,139 INFO [client1-001] [PushService] [client1-001-push-default-10] Pushing to server:010:010 again because the last push contained reload batches
2018-04-18 15:37:40,315 INFO [client1-001] [PushService] [client1-001-push-default-10] Push data sent to server:010:010
2018-04-18 15:37:41,347 ERROR [client1-001] [AcknowledgeService] [client1-001-push-default-10] The outgoing batch 010-12 failed: [23000,1048] Column 'id' cannot be null
Steps To Reproducesource node:
1.Oracle database type
2.Tables of needing to synchronzie do not have any primary keys and some fields of the tables are empty in the oracle database

target node:
1.MariaDB/MySQL database type
2.in the MariaDB/MySQL database, it has not the source_node_database_tables of needing to synchronzie
Additional InformationI wanted to sync a null value to the "id" column or other column,which is defined as nullable, can it be achieved?

thanks!
TagsNo tags attached.

Relationships

duplicate of 0003521 closedjosh-a-hicks Create Table First is creating table with all columns as primary key instead of none 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-04-24 23:10 ddlg_2 New Issue
2018-10-03 13:47 hanes Relationship added duplicate of 0003521
2018-10-03 13:48 hanes Status new => closed
2018-10-03 13:48 hanes Resolution open => duplicate