toLowerCase doesnt work proper in Turkish Locale

Hello,

When camunda spring boot project starts, it gives error. It works with postgres. (user name and schema name is same and table prefix is set properly, keep reading please).

Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03056 Tables are missing for the following components: [
  engine
  history
  identity
  decision.engine

I couldnt solve the problem with the solutions published on camunda forum and other places. After debugging, i realized that camunda-engine-7.18.0.jar has a class org.camunda.bpm.engine.impl.db.sql.DbSqlSession which has a code not suit for Turkish latin alphabet.

As you can see in the image below, table name comes ACT_RU_EXECUTION
(Accordingly just one embedded image rule for new members, i cant put this image for now. Just assume please.)

But it converts name to act_ru_executıon, means act_ru_execut\tu0131on
resim

So, the program never see the tables. If you use toLowerCase(Locale.ROOT), we may got a chance to use Camunda properly, otherwise, we may need to clone this library and keep it in the nexus as workaround solutions.

from String.class;

Converts all of the characters in this String to lower case using the rules of the default locale. This is equivalent to calling toLowerCase(Locale.getDefault()).
Note: This method is locale sensitive, and may produce unexpected results if used for strings 
that are intended to be interpreted locale independently. Examples are programming language
identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale
returns "t\u0131tle", where '\u0131' is the LATIN SMALL LETTER DOTLESS I character. To obtain
correct results for locale insensitive strings, use toLowerCase(Locale.ROOT).
Returns:
the String, converted to lowercase.

Thanks in advance…

Hi @atithesun,

in another situation, I could recently force java with java -Dfile.encoding=UTF-8 -jar ... to use the UTF-8 characters and not the characters from the windows code page.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier ,

Thank you for your quick suggestion. But unfortunately it didn’t work. Your solution suggestion led me to the method of sending parameters to vm. I found a solution with the following parameter. -Duser.language=en. Now it works.

Thank you, kind regards.

1 Like

Hi @atithesun,

thank you for the feedback and posting your solution here.