Menu

Informix: Error - Code set not supported

Help
2006-05-16
2017-12-06
  • Reiner Kräutle

    Reiner Kräutle - 2006-05-16

    Hi all,

    I tried to analyse an Informix DB schema and got the following error:
    ------
    Using database properties:
        [schemaSpy_3.0.0.jar]/net/sourceforge/schemaspy/dbTypes/informix.properties

    Failed to connect to database URL [jdbc:informix-sqli://bc1637:23012/gskvq:INFORMIXSERVER=custq_srv1]

    java.sql.SQLException: Encoding or code set not supported.
        at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:355)
        at com.informix.jdbc.IfxSqliConnect.setDatabaseLocale(IfxSqliConnect.java:2668)
        at com.informix.jdbc.IfxSqliConnect.setDatabaseOpen(IfxSqliConnect.java:2471)
        at com.informix.jdbc.IfxSqli.callsetDatabaseOpen(IfxSqli.java:2496)
        at com.informix.jdbc.IfxSqli.executeOpenDatabase(IfxSqli.java:1712)
        at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:1242)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:243)
        at net.sourceforge.schemaspy.Main.getConnection(Main.java:512)
        at net.sourceforge.schemaspy.Main.main(Main.java:146)

    ------

    Can I set the locale or the code set in the property file?

    Thanks,
    Reiner

     
    • John Currier

      John Currier - 2006-05-16

      Yes, there's a -connprops command line option to specify a properties file.  Not many people use it, so let me know if you run into any difficulties.

      John

       
      • Reiner Kräutle

        Reiner Kräutle - 2006-05-16

        Thanks John.

        I tried the specific (correct) locale properties using the -connprops parameter but the error still is the same:

        CLIENT_LOCALE=De_DE.819
        DB_LOCALE=De_DE.819

         
  • Eric Vercelletto

    Hi all

    after digging deep, the solution is very simple:
    here is an example to set CLIENT_LOCALE

    java -jar "C:\Tools\SchemaSpy\schemaSpy.jar" -dp "C:\Program Files (x86)\AGS\common\drivers\informix\jdbc\jdbc.3.70.jc1\ifxjdbc.jar" -t informix -db databaseName -host hostName:portNumber -port 8050 -u informix -p MyPasswd -server $INFORMIXSERVER -o outputDirectory -connprops="CLIENT_LOCALE\=en_US.819"
    

    just that simple

     

    Last edit: Eric Vercelletto 2017-12-06

Log in to post a comment.