zxs / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

error messages for empty URL should be more informative #275

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Make and configure your own custom applier
2. Neglect to set "replicator.resourceJdbcUrl" in file: 
"releases/tungsten-replicator-2.0.5/tungsten-replicator/conf/*.properties"
3. Load your custom applier and observe the logs

What is the expected output?

Something better than "Unsupported URL type: "

What do you see instead?

First of all, an error message with a quoted variable, such as:

    Unsupported URL type: ''    // <-- Empty quotes help you know it's set to the empty string

Second of all, it should indicate exactly which property in which config file 
is invalid, and give a hint as to the proper syntax of the file, or at least a 
couple of examples. Something like:

    Unsupported URL type: '', or URL type is unset
    You seem to have neglected to set replicator.resourceJdbcUrl" in file: "releases/tungsten-replicator-2.0.5/tungsten-replicator/conf/whatever.properties

What version of the product are you using?

Trunk from last week

On what operating system?

CentOS 5

Please provide any additional information below.

Notes:

There are a lot of crappy error messages like this in Tungsten, where when you 
search for the message, all you can find is Google indexed code that is 
responsible for printing the error message.

This product could go a long way if the error messages were comprehensive. You 
should go through all configuration errors and make sure it goes up the stack 
and prints the config file that has a problem, and the actual property.

It would also be nice if someone was in IRC.

Original issue reported on code.google.com by nho...@shutterstock.com on 15 Dec 2011 at 2:10

GoogleCodeExporter commented 9 years ago
Thanks for your report.
I could reproduce using the installer with 
--property=replicator.resourceJdbcUrl=''.

Please notice that, rather than tinkering with the configuration file on your 
own, you should use tungsten-installer, which will prevent the occurrence of 
empty mandatory properties, unless you force them explicitly. Please see the 
cookbook in the wiki to see how to use the installer properly:
http://code.google.com/p/tungsten-replicator/wiki/TRCBasicInstallation#Modify_on
e_or_more_properties_with_the_installer

Original comment by g.maxia on 15 Dec 2011 at 10:48