Re: Informix JDBC:sqli connection problem.
Posted in 1999
Angel Yes it will. I am using SE 7.24 on Linux, JDK 1.1.6 on Linux and Informix JDBC Driver 1.4. It works. You just need to change the JDBC URL slightly. Sujit Angel Gomez <angom@hotmail.com> on 10/08/99 07:35:58 AM To: muchan@promikra.si, informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: Re: Informix JDBC:sqli connection problem. Hello. >From: muchan <muchan@promikra.si> >Reply-To: muchan <muchan@promikra.si> >To: informix-list@iiug.org >Subject: Re: Informix JDBC:sqli connection problem. >Date: Fri, 08 Oct 1999 14:04:04 +0200 > >I could solve the problem of loading JDBC driver, but connection to >the database (on SE server on UNIX machine) never succeed... > >I always get Error message: > ERROR: failed to connect! > Exception in thread "main" java.lang.NullPointerException > at DBConnection.main(Compiled Code) > >The code causing exception is: > > try > { > conn = DriverManager.getConnection(newUrl); > } > catch (SQLException e) > { > System.out.println("ERROR: failed to connect!"); > } > >Can I trace down into DriverManager.getConnection() where the >exception occurs? Does Informix gives source code for JDBC driver? > >Debugging tips appreciated. > >muchan > Check this from the Informix JDBC Doc. Software Dependencies To use Informix JDBC Driver to connect to an Informix database, you must use one of the following Informix database servers: Informix Dynamic Server, Version 7.x Informix Dynamic Server, Workgroup and Developer Editions, Version 7.x Informix Dynamic Server with Advanced Decision Support and Extended Parallel Options, Version 8.x Informix Dynamic Server with Universal Data Option, Version 9.x INFORMIX-OnLine, Version 5.x You must also use the following JavaSoft software: Java Development Kit (JDK), Version 1.1.5 or later So, if you're using SE, it won't connect. :-( > > > > > > > > After managing to find to write correct argument, like > > > java DBConnection >'jdbc:informix-sqli://classic:1525:informixserver=classicnet; > > > user=muchan;passwd=pwd' > > > > > > I get: > > > ERROR: failed to load Informix JDBC driver. > > > ERROR: failed to connect! > > > Exception in thread "main" java.lang.NullPointerException > > > at DBConnection.main(Compiled Code) > > > > > > The code causing the error message is: > > > > > > try > > > { > > > Class.forName("com.informix.jdbc.IfxDriver"); > > > } > > > catch (Exception e) > > > { > > > System.out.println("ERROR: failed to load Informix JDBC >driver."); > > > } > > > > > > I checked ClassPath, and there is "ifxjdbc.jar", which contains the >class > > > "com.informix.jdbc.IfxDriver". So I suppose the class should be found >and > > > loaded. > > > > > > Do I missing something? > > > > > > Thanks in advance. > > > > > > muchan Angel Gomez TelNor, S.A. Tijuana, B.C., Mexico. <Angel.Gomez@telnor.com> ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com