Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have informix 11.5 running in my Win-2003 box and few databases running in it.
System databases have locale en_us.819
My custom databases have locale en_us.57372 (UTF8).

There is also application deployed to JBoss 4.0.2 which has few datasources configured for those custom databases.

    <new-connection-sql>set lock mode to wait 5</new-connection-sql>
    <check-valid-connection-sql>select '1' from dual</check-valid-connection-sql>

I'm logged in as Administrator and when I start JBoss the following error is shown

Caused by: java.sql.SQLException: Database locale information mismatch.
    at com.informix.util.IfxErrMsg.getSQLException(
    at com.informix.jdbc.IfxSqli.a(
    at com.informix.jdbc.IfxSqli.E(
    at com.informix.jdbc.IfxSqli.dispatchMsg(
    at com.informix.jdbc.IfxSqli.receiveMessage(
    at com.informix.jdbc.IfxSqli.executeOpenDatabase(
    at com.informix.jdbc.IfxSqliConnect.<init>(
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.lang.reflect.Constructor.newInstance(
    at com.informix.jdbc.IfxDriver.connect(
    at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(
    ... 160 more
Caused by: java.sql.SQLException
    at com.informix.util.IfxErrMsg.getSQLException(
    at com.informix.jdbc.IfxSqli.E(
    ... 170 more

DB_LOCALE and CLIENT_LOCALE are set to en_us.utf8 for Administrator.

When I set in Server Studio DB_LOCALE and CLIENT_LOCALE to en_us.utf8 I can connect my databases.

Where should I set DB_LOCALE and CLIENT_LOCALE to avoid this Database locale information mismatch error?


share|improve this question
up vote 2 down vote accepted

As per comment responses #5 and #11 by Guy Bowerman at his blog'll need to set it in your environment prior to executing the oninit command to start the server (on UNIX). If the server is on Windows, you can also set the variable in the registry under: HKEY_LOCAL_MACHINE\Software\Informix\Online\%INFORMIXSERVER%\Environment

The fix is to change both CLIENT_LOCALE from the default "EN_US.CP1252" and DB_LOCALE from the default "EN_US.8859-1" to "EN_US.UTF8" in the registry.

share|improve this answer
That helped. Thanks! I didn't try to set in ...Online\%INFORMIXSERVER%\Environment – lmmortal Jan 3 '11 at 20:17

You can set DB_LOCALE and CLIENT_LOCALE in JDBC database url. Have a look at my Jython code at: . There for Polish locale I use URL like:

share|improve this answer
It appeared I used some old Informix driver. Driver upgrade to v3.5 and setting locales in connection string helped. – lmmortal Nov 30 '10 at 6:15
Nice to hear that it works. You can accept my answer so it will not be listed as unanswered. – Michał Niklas Nov 30 '10 at 7:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.