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 > Informix database access problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-03, 02:39
khendy khendy is offline
Registered User
 
Join Date: Mar 2003
Posts: 2
Informix database access problem

Hi all,
I am using JDK1.2.2 with jdbc driver - ifxjdbc.jar
URL used to connect to database :
"jdbc:informix-sqli//10.224.66.5:1726/r16_pcllab:INFORMIXSERVER=crtcsrc;user=XXX;passwor d=XXX"
but I have problem connecting to the Informix database

Everytime I run the program using command line
java -classpath .:/<lib>/xerces.jar:/<lib>/ifxjdbc.jar:/<lib>/jdbc2_0-stdext.jar CreateDB

I will get this error:
java.sql.SQLException: Message text will be provided in later releases java.lang.IndexOutOfBoundsException
at com.informix.util.IfxErrMsg.getSQLException(IfxErr Msg.java, Compiled Code)
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliCon nect.java, Compiled Code)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java , Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager .java, Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager .java, Compiled Code)
at CreateDB.main(CreateDB.java, Compiled Code)

The error comes at the execution of the 'DriverManager.getConnection(url);' statement
I have also included 'Class.forName(com.informix.jdbc.IfxDriver);' in the codes and the driver has been loaded successfully.

I have tried changing using lowercase letter for 'informixserver' in the url but with the same error.
My ip address is 10.224.69.61 (if it may help)

Can someone help me with this problem please ?
Am I missing something here ?
Thank you
Reply With Quote
  #2 (permalink)  
Old 03-10-03, 03:13
khendy khendy is offline
Registered User
 
Join Date: Mar 2003
Posts: 2
Re: Informix database access problem

Hi again,
I have managed to solve the problem.

It is my own fault, actually. I got the port number wrong right from the start. After I fixed it, the program has no more problem connecting to the Informix database. =)

Thanks to all who have read my post and tried to help me solve the problem. Thank you for all the time you have put in.

Next time I would be more careful to make sure such things will not happen again.
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