Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I get an IfxASFException trying to connect

843854Jun 5 2003 — edited Jun 6 2003
I'm trying to establish a connection to an Informix OL5 server, which runs on my server (SCO OpenServer), from a Java application in my PC running Windows98.

I'm ussing the Informix JDBC Driver 2.21.JC4

My code is very simple:

======= Start of File ==========
import java.sql.*;

public class JProSud {
public static Connection con;

public static void main(String[] args) {
try {
Class.forName("com.informix.jdbc.IfxDriver");
} catch (Exception e) {
System.out.println("ERROR: Fallo al cargar el Informix JDBC driver.");
e.printStackTrace();
return;
}

String url = "jdbc:informix-sqli://192.168.100.2:203/event:INFORMIXSERVER=online_ba;user=informix;password=*****;USERV5SERVER=1";
try {
con = DriverManager.getConnection(url);
} catch (Exception e) {
System.out.println("ERROR: fallo al conectar!");
System.out.println("ERROR: " + e.getMessage());
e.printStackTrace();
return;
}
System.out.println("Conectado !!!!");
}
}
========== End Of File ================

When I run this, I get the following error:

ERROR: fallo al conectar!
ERROR: com.informix.asf.IfxASFException
java.sql.SQLException: com.informix.asf.IfxASFException
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:883)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruc
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegating
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:251)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at JProSud.main(JProSud.java:21)

I was trying to find a clue on both Informix-IBM and Java forums, but really I've no idea what's going wrong.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2003
Added on Jun 5 2003
1 comment
1,522 views