| Author |
Problem with JDBC connection with MySQL
|
aliasger talib
Ranch Hand
Joined: Aug 19, 2002
Posts: 37
|
|
Hi there, I have a piece of code which runs with MySQL. I've done everything right (I think!), but if still says that I have a problem accessing my database. I've put the Jar file of my JDBC connector in the class path and on running the Java class I get the following error: D:Code\classes>java com..jws.stockcore.StockCoreDOMGenerator Exception in thread "main" java.lang.ClassNotFoundException: COM.cloudscape.core .JDBCDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:198) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265) at java.lang.ClassLoader.loadClass(ClassLoader.java:262) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:130) at com..jws.stockcore.StockCoreDOMGenerator.main(StockCoreDOMGenerat or.java:114) Any idea what's happening. I'm using SDK 1.4 and MySQL 1.4. Can anyone help me out on this one.. Thanks in advance. - A.
|
 |
John Dunn
slicker
Ranch Hand
Joined: Jan 30, 2003
Posts: 1108
|
|
The following code works with mySQL 1.3.? You'll obviously have to put your SQL in instead of mine. I don't know why you are getting CLOUDSCAPE errors??? You should have the mySQL connector in your classpath. Make sure you don't have any other jdbc stuff in your path as well.
|
"No one appreciates the very special genius of your conversation as the dog does."
|
 |
aliasger talib
Ranch Hand
Joined: Aug 19, 2002
Posts: 37
|
|
I know, i realised it a bit later. Feel pretty embarassed! :roll: Thanks anyway. :-) - A.
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
Aliz, Why did you change your display name to one that violates the JavaRanch Naming Policy? Please change it back, or at least to a name that conforms. Thank you.
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
aliasger talib
Ranch Hand
Joined: Aug 19, 2002
Posts: 37
|
|
Hi Sherrif! :-) Sorry about that. Didn't know the rules. Changed it back. - A.
|
 |
 |
|
|
subject: Problem with JDBC connection with MySQL
|
|
|