I am trying to setup the environment and run the project but got this error:
Exception in thread “main” java.lang.IllegalStateException: Process [C:\Users\TAHSIL~1\AppData\Local\Temp\embedded-pg\PG-b0e04f3b1360d64f4864e04c12984930\bin\initdb.exe, -A, trust, -U, postgres, -D, C:\Users\TAHSIL~1\AppData\Local\Temp\epg17312934425280890538, -E, UTF-8] failed
at embedded.postgres@2.1.0/io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:633)
I thought it may be about permission issue so I started intellij idea with administrator privileges and run the project again but I got same result. I also stop my local running postgresql server but it also did not change anything. Do you have any idea why initdb.exe can not doing its job?
Someone reported that restarting their system fixed the same error for them, so please try that.
If that didn’t work then try to run the command by hand:
"C:\Users\TAHSIL~1\AppData\Local\Temp\embedded-pg\PG-b0e04f3b1360d64f4864e04c12984930\bin\initdb.exe" -A trust -U postgres -D "C:\Users\TAHSIL~1\AppData\Local\Temp\epg17312934425280890538" -E UTF-8
Thanks for your interest, now I understand what problem is about when I run command by hand.
initdb: hata: locale name “Turkish_Türkiye.1254” contains non-ASCII characters
it seems EmbeddedPostgres fails with Turkish language settings so I have overrided my local settings with ‘en-US’ once embedded-postgres is built like so:
embeddedPostgres = EmbeddedPostgres.builder()
.setLocaleConfig("locale", "en_US")
.setLocaleConfig("lc-messages", "en_US")
.setOutputRedirector(ProcessBuilder.Redirect.DISCARD)
.start();
And it works now, I am able to run project now. Thank you for your concern.