I’ve used the following example:
Can you try to run the command yourself, please?
I’ve used the following example:
Can you try to run the command yourself, please?
Hello,
I’m trying to execute in Java code analogue of Ant’s “updateDatabase” task:
First, I could not find an updateDatabase command. I’ve tried: update, updateSQL, but all the time I’m getting:
My db.test.properties file if it may help:
What am I doing wrong? Please help.
Not sure if this is the problem but your properties file should be format of
property_name=property_value using = instead of :b (colon)
Otherwise it looks correct. The command line parsing is done and the code doesn’t think it found a ‘command’ but update should work.
I think you’ve asked another question but I will answer this here in case anyone else runs into the same problem. The command line parameter you passed was seen as a single argument and instead of being broken into separate parameters. The result of this invocation is that Liquibase sees one parameter
parameter=–defaultsFile=db/properties/db.test.properties --logLevel=debug update
The code then splits the parameter to get the attribute and value:
attribute_name = defaultsFile
value = db/properties/db.test.properties --logLevel=debug update
As a result, Liquibase doesn’t really get the ‘update’ command, it is just part of the value of the defaultsFile string.
Should be something like this:
parms = new String String[]{
“–defaultsFile=db/properties/db.test.properties”,
“–logLevel=debug”,
“update”} ;
(found from your latest post)