3

Im working with jhipster and it uses liquibase to manage tables. But when it generates the sql query it messes up the characters. it turns "int" to "İNT" not "INT" and other "i" characters to "İ" (turkish character for uppercase i) so postgresql doesnt accept those. How do I make liquibase use english locale instead of turkish locale for uppercase conversion?

Caused by: liquibase.exception.DatabaseException: ERROR: type "�nt" does not exist
   Position: 47 [Failed SQL: CREATE TABLE public.databasechangeloglock (ID �NT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITHOUT TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
   at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
   at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
   at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
   at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:112)
   at liquibase.lockservice.StandardLockService.init(StandardLockService.java:87)
   at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:189)
   ... 114 more
Caused by: org.postgresql.util.PSQLException: ERROR: type "�nt" does not exist
   Position: 47
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:397)
   at com.zaxxer.hikari.proxy.StatementProxy.execute(StatementProxy.java:83)
   at com.zaxxer.hikari.proxy.StatementJavassistProxy.execute(StatementJavassistProxy.java)
   at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)
   ... 119 more
  • I haven't used jhipster so I'm not quite sure if it's possible in your case but you could try setting locale for whole jvm using command line params (see http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm). – Radek Postołowicz Aug 18 '15 at 12:03
  • Thanks for the reply and yes that actually works but it seemed more like a workaround than a solution... I normally use Turkish as the default locale so maybe there is something I can do with liquibase instead without affecting the jvm locale. – Hasan Tekgül Aug 19 '15 at 13:26
  • 2
    This is a bug in Liquibase: https://liquibase.jira.com/browse/CORE-2772 – Ali Ok May 25 '16 at 22:06
  • Hasan çözebildin mi sorunu(did you solve this) – Ismail Sahin Mar 04 '18 at 16:25
  • yes I solved it by setting default Locale inside DataSource bean setup but I think a better solution is to run maven (if you use it) with "-Duser.language=en -Duser.region=US" arguments. – Hasan Tekgül Mar 05 '18 at 16:52

0 Answers0