how to specify changeLogProperty to LiquibaseServletListener

Hi,

I use a variable in my change file. As used from Ant like this:

Is there a way to get this variable into Liquibase when I call it from the ServletListener?

I now get:
Reason: liquibase.exception.DatabaseException: Error executing SQL etc…:
         Caused By: Error executing SQL CREATE TABLE ${schemaName}.company etc…:
         Caused By: Unknown JDBC escape sequence: {: {schemaName}.company (id etc…:
         Caused By: Unknown JDBC escape sequence: {: {schemaName}.company (id etc…
at liquibase.integration.servlet.LiquibaseServletListener.contextInitialized(LiquibaseServletListener.java:139)

I used the variable in my xml’s  before I discovered the defaultSchemaName attribute of . :slight_smile:
I will also test to see if I can remove the variable from the xml, as I only need 1 schema at the moment.

thanks,
Liquiuser

Hi,

I found that I can set the variable through a java system property, so that is ok for now.

But now the Liquibase standard tables DATABASECHANGELOG are still placed in de public schema.
I also need to get these into my own schema.

I added a liquibase.properties with “defaultSchemaName=XXXXXX” to the jar file but it seems it is not read by the servlet version?

thanks,
Liquiuser

The ServletListener does not check the liquibase.properties file at this point.  You’ll probably have to extend or copy LiquibaseServletListener and call setDefaultSchema on the liquibase object that gets created.

Nathan