First, I never heard of "Java 1.18." Second, as I'm sure somebody
else will point out, this is not the forum to be asking JDBC
questions. However, it looks like your driver is not getting loaded.
Here's what I do (albeit for an Oracle database) in the constructor of
my SQL class:
import java.sql.*;
import java.util.*;
public class GetSQL {
private Connection conn;
public GetSQL throws SQLException {
try {
Class.forName( Configuration.getString( "driver",
"oracle.jdbc.driver.OracleDriver"));
} catch ( ClassNotFoundException e) {
e.printStackTrace ();
}
conn = DriverManager.getConnection( Configuration.getString(
"url",
jdbc:oracle:oci8:[EMAIL PROTECTED]"));
}
}
Cheers!
Mark
----- Original Message -----
From: "Paras Sharma" <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 12:35 AM
> Hi
> i am using informix database with java 1.18 ihave download the
> informix driver 1.5 from the informix site
> can anyone tell me why this error is coming in getting the
connection
>
> try {
> Class.forName("com.informix.jdbc.IfxDriver");
> }
> catch (Exception e){
> System.out.println("ERROR: failed to load Informix JDBC
> driver."+e.toString());
> }
> try{
> conn =
>
>
DriverManager.getConnection("jdbc:informix-sqli://192.168.249.62:8000/
mydb:informixserver=server1;"+
>
> "user=user1;" +"password=user1;");
> catch (SQLException e){
> System.out.println("\n* ERROR failed to
> connect!--"+e.getMessage() +" toStringErrror"+e.toString());
> e.printStackTrace();
> System.out.println("\n message error conde "+
> e.getErrorCode()+" state : "+ e.getSQLState());
> }
>
> /////////////////////////////////////////
>
Exception/////////////////////////////////////////////////////////////
///////////////////////
>
> * ERROR failed to connect! --null toStringError:
> java.sql.SQLException
> java.sql.SQLException
> at com.informix.jdbc.IfxSqliConnect.<init>(Compiled Code)
> at com.informix.jdbc.IfxDriver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at
java.sql.DriverManager.getConnection(DriverManager.java:141)
> at test.main(test.java:20)
>
> message error code -408 state : IX000
>
>
> Thanks in advance
>
> Paras
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html