Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I can't connect to DB

 
Ekrem Altintas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I,m trying to connecting to sample database of NetBeans 6. But I'm getting an error on this line:
Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();

It says:

Method "forName" in class "java.lang.Class" threw an exception: instance of java.lang.ClassNotFoundException(id=349)

How can I solve this problem?

Thank you

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure your driver is in your classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic