0

I am setting up a new user for liquibase (3.5.3). When we run the following command:

liquibase --defaultsFile=Config /Liquibase.properties --logLevel=Info

We get this error message:

--contexts=initial update Unexpected error running Liquibase: Unknown parameter: '#Liquibase.properties '

SEVERE 2/7/17 11:39 AM: liquibase: Unknown parameter: '#Liquibase.properties'

liquibase.exception.CommandLineParsingException: Unknown parameter: '#Liquiba se.properties' at liquibase.integration.commandline.Main.parsePropertiesFile(Main.java: 476) at liquibase.integration.commandline.Main.run(Main.java:164) at liquibase.integration.commandline.Main.main(Main.java:103)

For more information, use the --logLevel flag

I thought there may have been a funny character in the file, so we recreated it, but still received the same error. We also, took a working copy of a properties file from another project and modified it. This also produced the same result.

Any ideas on what is going wrong or thoughts on how to fix it, would be greatly appreciated. m

Mark Wojciechowicz
  • 4,287
  • 1
  • 17
  • 25
  • `` is a [UTF-8 BOM](https://en.wikipedia.org/wiki/Byte_order_mark) – tkausl Feb 07 '17 at 17:08
  • oh, brilliant. What encoding is liquibase expecting? – Mark Wojciechowicz Feb 07 '17 at 18:21
  • I don't know, UTF-8 might be alright, however, you'd need to save the file _without the BOM_. There should be an option in your text-editor somewhere to write as UTF-8 without BOM. – tkausl Feb 07 '17 at 18:24
  • @tkausl, I saved it to ansi using notepad, which allows you to specify the encoding (http://stackoverflow.com/questions/3710374/get-encoding-of-a-file-in-windows). If you don't mind answering this question, I would like to give you credit. thank you for your help – Mark Wojciechowicz Feb 07 '17 at 18:35

1 Answers1

1

 is a UTF-8 Byte order mark (or short BOM). Some text editors write one by default when using UTF-8 encoding, even though, most programs do not understand it.

In your case, liquibase seems to be one of the programs which do not understand the BOM and treat it as the beginning of a parameter. To fix this, make sure you save the file as UTF-8 without BOM if your editor supports this option, or alternatively, as ASCII or ISO 8859 (ANSI) if you only use characters defined in ASCII.

tkausl
  • 13,686
  • 2
  • 33
  • 50