Re: Informix JDBC TYPE4 Drivers
Posted in 1998
Hello,
I have a similar problem.
The error is:
ERROR: failed to connect!
java.lang.NullPointerException
at SimpleConnection.main(SimpleConnection.java:65)
Message 65 means: host unreachable.
when I try to connect to the database server with the following url:
"jdbc:informix-sqli://afrodita:1099:informixserver=museos;user=vfr;password=coletas"
Kazuhiko Nishigori wrote:
>
> Hello.
>
> I have tested the new JDBC type 4 Informix driver.
> But I get error show below.
>
when I try to connect to the database server with the following url:
"jdbc:informix-sqli://afrodita:1099:informixserver=museos;user=vfr;password=coletas"
My database server is
> Informix-OnLine Dynamic V7.2 on Hp-Ux 10.20
> The configuration of this server shows below.
>
> <$INFORMIXDIR/etc/sqlhosts>
> museos onsoctcp afrodita museos_tcp>
> </etc/services>
> museos_tcp 1099/tcp
Is something more neccesary?
-----------------------------------------------------------------------
> java.sql.SQLException: Attempt to connect to a non 5.x server.
> at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java)
> at com.informix.jdbc.IfxDriver.connect(Compiled Code)
> at java.sql.DriverManager.getConnection(Compiled Code)
> at java.sql.DriverManager.getConnection(DriverManager.java:149)
> at JdbcApplet.action(Compiled Code)
> at java.awt.Component.handleEvent(Compiled Code)
> at java.awt.Component.postEvent(Compiled Code)
> at java.awt.Component.postEvent(Compiled Code)
> at java.awt.Component.postEvent(Compiled Code)
> at java.awt.Component.dispatchEventImpl(Compiled Code)
> at java.awt.Component.dispatchEvent(Compiled Code)
> at java.awt.EventDispatchThread.run(Compiled Code)
> -------------------------------------------------------------------------
>
> when I try to connect to the database with the following url:
>
> static final String connect_string =
> "jdbc://133.190.106.31:1541/sys_data:INFORMIXSERVER=s4000;
> user=informix;password=informix;USEV5SERVER=1";
> static final String driver_class = "com.informix.jdbc.IfxDriver";
>
> DriverManager.registerDriver((Driver)Class.forName(driver_class).newInstance()
> );
> conn = DriverManager.getConnection (connect_string);
>
> My database server is
> Informix-OnLine V5.01 and Informix-STAR V5.01 on Unixware2.1.
> The configuration of this server shows below.
>
> <$INFORMIXDIR/etc/sqlhosts>
> s4000 olsoctcp myhosts star1>
> </etc/services>
> star1 1541/tcp # Informix Star
>
> Anything more is neccesary for the connection?
>
> Thank you.
>
> ---------
> Kazuhiko Nishigori.
> KAWASAKI STEEL Systems R&D Corporation
>
> mailto: nishigori@ksd.co.jp