• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting Classpath for Derby on OS X

 
Greenhorn
Posts: 16
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I am facing the following problem.
Trying to get Derby DB working in Embedded mode on my Macbook, but getting the following error :

java.sql.SQLException: No suitable driver found for jdbc:derby



Seems like trouble with classpath, getting the following when running setEmbeddedCP in my terminal:



The following are contents of bash_profile


Any ideas?
Thanks


 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John Longer,

First of all, a warm welcome to CodeRanch!

John Longer wrote:Any ideas?


Did you follow the Apache Derby Tutorial? It explains all different steps: install software, configure Embedded Derby and how an application has to access a Derby database using the Embedded Derby JDBC driver.

Hope it helps!
Kind regards,
Roel
 
John Longer
Greenhorn
Posts: 16
1
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Roel

Thank you.

Yes, I've read tutorial, but it is missing part for OS X.
Managed to do.
In case anybody needs it
add to bash_profile your path to JDBC installation.

In my case it was Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Home/Contents/db/lib/derby.jar.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
John,
Have a cow for posting how you solved it. I have a blog post on how to get Derby running. I did test it on Mac.

I mention updating the class path to make it a wee less OS specific. But bash_profile is certainly more convenient. I've added that as a comment and linked to this thread.
 
John Longer
Greenhorn
Posts: 16
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Jeanne.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic