View Issue Details

IDProjectCategoryView StatusLast Update
0003647SymmetricDSBugpublic2019-03-14 12:48
Reportermstoute Assigned Topmarzullo  
Prioritylow 
Status closedResolutionfixed 
Product Version3.9.9 
Target Version3.10.0Fixed in Version3.10.0 
Summary0003647: dbcompare: unclear error for duplicate table names in source tables argument
DescriptionWhen running dbcompare from the commandline, with a duplicated table name in source tables argument yields the error "org.jumpmind.symmetric.SymmetricException: Source table names must be the same length as the list of target table names."

This is misleading as the source_tables and target_tables arguments were in fact the same length. A clearer error message could be 'duplicate table name detected in argument source_tables: <table_name>'.

In the Error mesage in steps to reproduce, the last line shows table 'x' four times, but it was only provided twice. This explains the resulting 'Not Same Length' exception message. The fact that table 'x' has doubled here may be alarming (inadvertent loop).

In a large list (100's) of tables with a single duplicate table name, the cause is much harder to spot, and a clearer error message would be very helpful.
Steps To ReproduceWith dbcompare.properties like:
source_tables=x,a,b,c,d,x
target_tables=x,a,b,c,d,x

and valid source/target configuration, running dbcompare yields:



SymmetricDS_dbcompare] - DbCompare - Starting DBCompare with config:
    sourceTableNames=[x, a, b, c, d, x] @dbcompare.properties
    targetTableNames=[x, a, b, c, d, x] @dbcompare.properties
    excludedTableNames=null @default
    useSymmetricConfig=false @default
    numericScale=3 @default
    whereClauses={}@default
    tablesToExcludedColumns={} @default
    outputSql=null @null

-------------------------------------------------------------------------------
An exception occurred. Please see the following for details:
-------------------------------------------------------------------------------
org.jumpmind.symmetric.SymmetricException: Source table names must be the same length as the list of target table names. Check your arguments. source table names = [x, x, a, b, c, d, x, x] target table names = [x, a, b, c, d, x]
TagsNo tags attached.

Activities

hanes

2018-09-19 14:58

developer   ~0001241

Confirmed issue. Error message also duplicates the duplicate table name too (strangely enough) as bug reported showed in the error message

pmarzullo

2019-01-18 16:13

developer   ~0001385

There was a bug in the filterTables() method.

That has been fixed, and additional output has been added when the list of source and target table names do not match, making it easier to debug the lists.

Related Changesets

SymmetricDS: 3.10 bd1f7154

2019-01-18 11:12:00

philipmarzullo

Details Diff
0003647: dbcompare: unclear error for duplicate table names in source
tables argument
Affected Issues
0003647
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/io/DbCompare.java Diff File

Issue History

Date Modified Username Field Change
2018-07-25 20:26 mstoute New Issue
2018-09-19 14:58 hanes Status new => confirmed
2018-09-19 14:58 hanes Note Added: 0001241
2018-10-10 17:16 hanes Summary dbcompare: unclear error for duplicate table names in srouce tables argument => dbcompare: unclear error for duplicate table names in source tables argument
2018-10-10 18:09 hanes Target Version => 3.10.0
2019-01-18 14:56 pmarzullo Assigned To => pmarzullo
2019-01-18 14:56 pmarzullo Status confirmed => assigned
2019-01-18 16:13 pmarzullo Status assigned => resolved
2019-01-18 16:13 pmarzullo Resolution open => fixed
2019-01-18 16:13 pmarzullo Fixed in Version => 3.10.0
2019-01-18 16:13 pmarzullo Note Added: 0001385
2019-01-18 17:00 Changeset attached => SymmetricDS 3.10 bd1f7154
2019-03-14 12:48 admin Status resolved => closed