Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Question Unanswered: Solaris Informix jdbc problem with connect

    I am completely new user to jdbc.
    I am working on Informix Dynamic Server Version 7.31.UC2A database server. I am just trying to connect to the database using the following url.

    jdbc:informix-direct:// testDB:INFORMIXSERVER=iin_online

    When I run the program the following error is returned.

    ERROR : Failed to connect to database Can't load driver java.lang.ClassNotFoundE
    xception: com.informix.jdbc.IfxDirectConnection
    java.sql.SQLException: Can't load driver java.lang.ClassNotFoundException: com.i
    nformix.jdbc.IfxDirectConnection
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Exception.java:42)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at com.informix.util.IfxErrMsg.getLocSQLException(Ifx ErrMsg.java:447)
    at com.informix.jdbc.IfxDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(DriverManager .java:137)
    at jdbcTest.main(jdbcTest.java:24)


    And the class file IfxDirectConnection is not in the library path. I am not able to understand why is it asking for that class.
    Is this the proper way to get connected to the database when I run my application on the same machine where the database server is running. I would appreciate if sombody can help me in this.

  2. #2
    Join Date
    Oct 2002
    Posts
    52
    hi

    Did you downloaded from the informix web site the relevant classes?
    did you imported the class to the java:
    (import com.informix.jdbcx.*; - or something like that)

    Dafna

  3. #3
    Join Date
    Oct 2002
    Posts
    2

    Question

    Originally posted by thedafna
    hi

    Did you downloaded from the informix web site the relevant classes?
    did you imported the class to the java:
    (import com.informix.jdbcx.*; - or something like that)

    Dafna
    I got an already downloaded package. Can you give me a link from where I can download the required classes ?

    Yaa, I did import the class as
    import com.informix.jdbc.*

    Among the libraries I have I can not see the class IfxDirectConnection.class. Is it that I am using a wrong version. Or the method used it self is wrong.

    As far as I know, in informix, if an application wants to connect to the database that is running on the same machine the client communicates thru' the shared memory interface, otherwise thru' the socket with the port specified in /etc/services. Interestingly the same application is running on a different windows machine.

    sachi

  4. #4
    Join Date
    Oct 2002
    Posts
    52
    hi
    The web site is:
    http://www.informix.com/evaluate/#1

    I use windows, and it works, so if your problem is only in Unix I can't help.

  5. #5
    Join Date
    Mar 2002
    Posts
    112

    re

    what's you CLASSPATH env. var. value ?
    it have to set value of it to your .class or .jar file

Posting Permissions

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