Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2003
    Posts
    3

    Red face Unanswered: JDBC :I got some problem to connect to database ...

    Hi
    I got some problem to connect to database ...

    Here is the situation:
    Informix build on AIX (IP:10.1.2.20 PORT:20006)

    (1)
    When URL=
    jdbc:informix-sqli://10.1.2.20:20006/x509Cert_db:INFORMIXSERVER=f40_server

    I run my java application on Window2000 platform (IP:10.1.2.139)
    it can connect to database correctly , but when run the same java application on AIX(IP:10.1.2.20) it can't connect to database ...
    I got error:
    Unable to load locale categories.
    (Error code :-23101)

    (2)
    When URL=
    jdbc:informix-sqli://localhost:20006/x509Cert_db:INFORMIXSERVER=f40_server

    I run my java application on AIX(IP:10.1.2.20) it still can't connect to database.
    I got error:
    Attempt to connect to database server (f40_server) failed.
    (Error code :-908)

    What's wrong?

  2. #2
    Join Date
    Aug 2002
    Location
    Bonn/Germany
    Posts
    152

    Re: JDBC :I got some problem to connect to database ...

    Number (2) can't work because the IFMX databaseserver
    is listening on the 10.1.2.20 IP address and not on the
    localhost IP address.
    If you want to be able to connect using 'localhost' you have
    to setup a new DBSERVERALIASES and configure this
    in your $INFORMIXSQLHOSTS file to start a listener on
    'localhost'.

    Are you able to connect via 'dbaccess' from the second
    AIX host ?

    Error -23101 is normally issued when your $INFORMIXDIR
    settings are not appropriate.
    However with JDBC you don't need to set INFORMIXDIR
    because all you need is the JDBC-Driver (ifxjdbc.jar) on
    your client machine in order to connect to the IFMX databaseserver.

    I'm not sure, but I would suggest that you check your
    environment settings on the AIX box.



    Originally posted by albert.chang
    Hi
    I got some problem to connect to database ...

    Here is the situation:
    Informix build on AIX (IP:10.1.2.20 PORT:20006)

    (1)
    When URL=
    jdbc:informix-sqli://10.1.2.20:20006/x509Cert_db:INFORMIXSERVER=f40_server

    I run my java application on Window2000 platform (IP:10.1.2.139)
    it can connect to database correctly , but when run the same java application on AIX(IP:10.1.2.20) it can't connect to database ...
    I got error:
    Unable to load locale categories.
    (Error code :-23101)

    (2)
    When URL=
    jdbc:informix-sqli://localhost:20006/x509Cert_db:INFORMIXSERVER=f40_server

    I run my java application on AIX(IP:10.1.2.20) it still can't connect to database.
    I got error:
    Attempt to connect to database server (f40_server) failed.
    (Error code :-908)

    What's wrong?

    Best regards

    Eric
    --
    IT-Consulting Herber
    WWW: http://www.herber-consulting.de
    Email: eric@herber-consulting.de

    ***********************************************
    Download the IFMX Database-Monitor for free at:
    http://www.herber-consulting.de/BusyBee
    ***********************************************

  3. #3
    Join Date
    Feb 2003
    Posts
    3

    Smile Re: JDBC :I got some problem to connect to database ...

    Thanks for your help!
    (And sorry, my english was poor! )

    ENVIRONMENT VARIABLES on AIX :
    INFORMIXDIR=/home/informix
    CLIENT_LOCALE=TW.Big5
    DB_LOCALE=TW.Big5

    With the same database, java application and JDBC-Driver.
    In situation (1), both my java application were a client program for the database, but I got different results. It seems not wrong with informix.

    Do you think the different in JRE will cause these results? (On window2000 is JDK 1.3.1 ,Sun version. On AIX is JDK 1.3.0 ,IBM version)



    Originally posted by eherber
    Number (2) can't work because the IFMX databaseserver
    is listening on the 10.1.2.20 IP address and not on the
    localhost IP address.
    If you want to be able to connect using 'localhost' you have
    to setup a new DBSERVERALIASES and configure this
    in your $INFORMIXSQLHOSTS file to start a listener on
    'localhost'.

    Are you able to connect via 'dbaccess' from the second
    AIX host ?

    Error -23101 is normally issued when your $INFORMIXDIR
    settings are not appropriate.
    However with JDBC you don't need to set INFORMIXDIR
    because all you need is the JDBC-Driver (ifxjdbc.jar) on
    your client machine in order to connect to the IFMX databaseserver.

    I'm not sure, but I would suggest that you check your
    environment settings on the AIX box.

  4. #4
    Join Date
    Aug 2002
    Location
    Bonn/Germany
    Posts
    152
    I don't think that this a problem of the JVM.

    Is there a difference in the JDBC versions you use
    on Windows and AIX ?

    You can get the version information of the IFMX JDBC driver
    with the following command:

    java com.informix.jdbc.Version


    Older versions of the IFMX JDBC driver didn't support
    NLS databases. So this might be the problem.
    Try unsetting CLIENT_LOCALE and DB_LOCALE and
    test the connection again.

    Best regards

    Eric
    --
    IT-Consulting Herber
    WWW: http://www.herber-consulting.de
    Email: eric@herber-consulting.de

    ***********************************************
    Download the IFMX Database-Monitor for free at:
    http://www.herber-consulting.de/BusyBee
    ***********************************************

  5. #5
    Join Date
    Feb 2003
    Posts
    3
    I use the same IFMX JDBC driver on Windows and AIX.
    This is the version information :

    IBM Informix JDBC Driver Version 2.21.JC2
    Software Serial Number (Unregistered Version)


    When unsetting CLIENT_LOCALE and DB_LOCALE and
    test the connection again, I got the same result :

    java.sql.SQLException: Unable to load locale categories.
    at com.informix.util.IfxErrMsg.getSQLException(IfxErr Msg.java:348)
    at com.informix.jdbc.IfxSqli.addException(IfxSqli.jav a:3025)
    at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.jav a:3335)
    at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java :2288)
    at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.j ava(Compiled Code))
    at com.informix.jdbc.IfxSqli.executeOpenDatabase(IfxS qli.java:1703)
    at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliCon nect.java:1007)
    at java.lang.reflect.Constructor.newInstance(Native Method)
    at com.informix.jdbc.IfxDriver.connect(IfxDriver.java :251)
    at java.sql.DriverManager.getConnection(DriverManager .java:523)
    at java.sql.DriverManager.getConnection(DriverManager .java:183)
    at TESTDB.main(TESTDB.java:12)



    I think some environment settings on the AIX were not correct. I'll try again.


    Originally posted by eherber
    I don't think that this a problem of the JVM.

    Is there a difference in the JDBC versions you use
    on Windows and AIX ?

    You can get the version information of the IFMX JDBC driver
    with the following command:

    java com.informix.jdbc.Version


    Older versions of the IFMX JDBC driver didn't support
    NLS databases. So this might be the problem.
    Try unsetting CLIENT_LOCALE and DB_LOCALE and
    test the connection again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •