is00hcw / tungsten-replicator

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

tpasswd exists with NPE when password file is missing #665

Closed GoogleCodeExporter closed 9 years ago

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

1. run tpasswd -c xxx yyy

What is the expected output?

tpasswd should warn that no password file was defined, and exit with an error

What do you see instead?

$ ./cluster-home/bin/tpasswd  -c xxxx dd
Using parameters:
-----------------
password_file.location   = null
encrypted.password   = false
-----------------
Exception in thread "main" java.lang.NullPointerException
    at java.io.File.<init>(File.java:251)
    at com.continuent.tungsten.common.security.PasswordManager.try_createAuthenticationInfoFiles(PasswordManager.java:295)
    at com.continuent.tungsten.common.security.PasswordManagerCtrl.main(PasswordManagerCtrl.java:229)

What is the possible cause?

N/A

What is the proposed solution?

the password file parameter should be mandatory, and as such checked for 
completion before any action is taken.

Original issue reported on code.google.com by g.maxia on 10 Aug 2013 at 7:25

GoogleCodeExporter commented 9 years ago
Error message is now shown like other "configuration" errors

Original comment by ludovic....@continuent.com on 19 Aug 2013 at 12:38