When I run the program the following error is returned.
ERROR : Failed to connect to database Can't load driver java.lang.ClassNotFoundE
java.sql.SQLException: Can't load driver java.lang.ClassNotFoundException: com.i
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
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)
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.
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)
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
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.