|
I am completely new user to jdbc.
I am working on Informix Dynamic Server Version
7.31.UC2A database server. I am just trying to connect to the database using the
following url.
jdbc:informix-direct://
testDB:INFORMIXSERVER=iin_online
When I run the program the following error is
returned.
ERROR : Failed to connect to database Can't
load driver java.lang.ClassNotFoundE xception:
com.informix.jdbc.IfxDirectConnection java.sql.SQLException: Can't load
driver java.lang.ClassNotFoundException:
com.i nformix.jdbc.IfxDirectConnection
at java.lang.Throwable.fillInStackTrace(Native
Method) at
java.lang.Throwable.fillInStackTrace(Compiled
Code) at
java.lang.Throwable.<init>(Compiled
Code) at
java.lang.Exception.<init>(Exception.java:42)
at
java.sql.SQLException.<init>(SQLException.java:43)
at
com.informix.util.IfxErrMsg.getLocSQLException(IfxErrMsg.java:447)
at com.informix.jdbc.IfxDriver.connect(Compiled
Code) at
java.sql.DriverManager.getConnection(Compiled
Code) at
java.sql.DriverManager.getConnection(DriverManager.java:137)
at jdbcTest.main(jdbcTest.java:24)
And the class file IfxDirectConnection is not in
the library path. I am not able to understand why is it asking for that
class.
Is this the proper way to get connected to the
database when I run my application on the same machine where the database server
is running. I would appreciate if sombody can help me in this.
Regards
sachi
Sachidananda Karkala Huandian R&D Building
6B06, BanTian HUAWEI, ShenZhen, Guangdong, China - 518129 Office :
+86-755-28787035 Home : +86-755-28767692
|