• 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

JDBC Applet problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run a sample JDBC Applet code I picked from Sun's Java web site. I have a Derby DB sitting on my local PC and thought I would be able to leverage the sample to connect to this local DB and issue a select SQL statement and display the results. But it throws me an error stating:

SQLException: java.sql.SQLException: Not suitable driver found
Any pointers as to why I am getting this error?

My CLASSPATH environment variable is set to:
C:\db-derby-10.3.2.1-bin\lib\derby.jar;.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip

Sample Java Code:

Thanks in advance for any help.

Arthur
[ December 19, 2007: Message edited by: Arthur Johnson ]
 
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
Arthur,
Welcome to JavaRanch!

I'm going to move this to our Applets forum where they know about how classpaths affect applets.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applets do not use the CLASSPATH variable. You need to include all necessary jar files in the archive attribute of the applet tag. See here for more detail on that.

Also be aware that if Derby needs access to the local file system (and I think it does, although it may have in-memory modes), which applets do not have for security reasons - it would need to be signed. See HowCanAnAppletReadFilesOnTheLocalFileSystem for further information.
[ December 21, 2007: Message edited by: Ulf Dittmer ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic