If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Solaris Informix jdbc problem with connect

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-02, 01:04
sachi_achar sachi_achar is offline
Registered User
 
Join Date: Oct 2002
Posts: 2
Question 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.
Reply With Quote
  #2 (permalink)  
Old 10-30-02, 03:44
thedafna thedafna is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 10-30-02, 03:56
sachi_achar sachi_achar is offline
Registered User
 
Join Date: Oct 2002
Posts: 2
Question

Quote:
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
Reply With Quote
  #4 (permalink)  
Old 10-30-02, 05:14
thedafna thedafna is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 10-31-02, 05:35
dananio dananio is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On