• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Problem with JDBC connection with MySQL

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
slicker
Posts: 1108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
aliasger talib
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know, i realised it a bit later. Feel pretty embarassed! :roll:
Thanks anyway. :-)
- A.
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
aliasger talib
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sherrif! :-)
Sorry about that. Didn't know the rules. Changed it back.
- A.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!