Re: Problems with new Informix JDBC type 4 driver ...
Posted in 1998
Christoph Borowski wrote: >Hi, > >does somebody use the new JDBC type 4 Informix driver, which is now >available?. Trying to use it, I get the error shown below. > >SQLException in initDatabase(): No suitable driver >Exception in thread "main" java.lang.NullPointerException > at JDBCConnection.getDataFromDatabase(Compiled Code) > at >JDBCConnection.activateConnectionDialog(JDBCConnection.java:268) > at JDBCConnection.main(JDBCConnection.java:397) > >The error occurs, when I try to connect to the database with the >following url: > >String db_url = >"jdbc:informix-sqli://131.234.20.27:1500/stores7:informixserver=infdbengels:user=xxx:password=yyy"; >con = DriverManager.getConnection(db_url); > >The classpath to the driver is set (c:\\Programme\\Informix\\jdbc\\lib), so >what is wrong? > What about setting the classpath to c:\\Programme\\Informix\\jdbc\\lib\\ifxjdbc.jar And if you don't do this: DriverManager.registerDriver((Driver) Class.forName("com.informix.jdbc.IfxDriver").newInstance()); Best Regards, Octav -- Octav Chiriac Phone: (373) 2 21 20 96 NetInfo S.R.L. Fax: (373) 2 21 20 96 Chisinau (373) 2 24 00 83 Moldova, Republic of mailto:com@netinfo-moldova.com