problems on JDBC and Cloudscape
843854Nov 22 2002 — edited Nov 23 2002Hi,
I'm suffering from a problem I got while using Cloudscape.
I wrote a program to create a database in cloudscape. It is a very simple program. The main
part is as follows,
Class.forName("COM.cloudscape.core.JDBCDriver");
Connection conn = DriverManager.getConnection("jdbc:cloudscape:LibDB;create=true");
The java file is saved in the directory c:\myfile\Create_DB.java and be compiled to
Create_DB.class.
At the very Beginning, I didn't add cloudscape.jar to the Classpath, so I got the common
error:
java.lang.NoClassDefFoundError: COM.cloudscape.core.JDBCDriver
Later, I added those jars related to cloudscape to the CLASSPATH, a strange thing happened.
Now, the error became:
java.lang.NoClassDefFoundError: Create_DB
Then, I thought maybe I need to add the working directory to the Classpath. So, I add
c:\library to CLASSPATH. But the first error (java.lang.NoClassDefFoundError:
COM.cloudscape.core.JDBCDriver) appeared again though the cloudscape.jar was still in the
CLASSPATH.
I tried and tried, but the strange problem is still there. I really got crazy. Please Help !
I set the CLASSPATH as following:
%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\cloudscape\system\cloudscape.jar;%J2EE_HOME%\lib\cl
oudscape\cloudclient.jar;%J2EE_HOME%\lib\cloudscape\RmiJdbc.jar;%J2EE_HOME%\lib\cloudscape\c
loudview.jar
PATH is
;%JAVA_HOME%\bin;%J2EE_HOME%\bin
Thank you for your time.