View Issue Details

IDProjectCategoryView StatusLast Update
0003647SymmetricDSBugpublic2018-10-10 14:09
ReportermstouteAssigned To 
Prioritylow 
Status confirmedResolutionopen 
Product Version3.9.9 
Target Version3.10.0Fixed in Version 
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]

Activities

hanes

2018-09-19 10:58

developer   ~0001241

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

Issue History

Date Modified Username Field Change
2018-07-25 16:26 mstoute New Issue
2018-09-19 10:58 hanes Status new => confirmed
2018-09-19 10:58 hanes Note Added: 0001241
2018-10-10 13: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 14:09 hanes Target Version => 3.10.0