Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Applets/JDBC

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use JDBC to conect to oracle. I have an application that connects fine to oracle. But with the same code it doesn't connect when trying to run as applet. I get "ClassNotFound" exception for class "oracle\jdbc\driver\OracleDriver". I use Class.forName( oracle.jdbc.driver.OracleDriver ) to load the class.
Any suggestions?
Thanks in advance.
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You need to use a Type 4 driver i.e. all Java driver that uses TCP/IP to connect to Oracle. You need to include that in your applet codebase so that the applet will be able to load the class files.
Ashwin.
 
Shekhar Tayade
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ashwin, I will try that.
-Shekhar.

Originally posted by Ashwin Desai:
Hi,
You need to use a Type 4 driver i.e. all Java driver that uses TCP/IP to connect to Oracle. You need to include that in your applet codebase so that the applet will be able to load the class files.
Ashwin.


 
Shekhar Tayade
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked. I do have type 4 driver, Oracle's thin JDBC driver.
I also added the URL for the driver class into CODEBASE. I still get the same exception: ClassNotFound : oracle.jdbc.driver.OracleDriver
In codebase I included "c:\oracle\jdbc\driver\", that's where the driver is located.
Am I missing something here? Any help/sugeestions highly appreciated.
Thanks!
- Shekhar.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the same problem at the momment as well. I have spend most of the morning try to get this working and have found a little help a long the way. Below are URL that should give you a hand.
http://www.javaranch.com/ubb/Forum23/HTML/000133.html http://www.javaranch.com/ubb/Forum23/HTML/000267.html http://www.javaranch.com/ubb/Forum3/HTML/000047.html
They talk about using servlets to talk to the database since the applet can not provide a secure connect to the database. If anyone can detail a simplier way to do this that does not envole the use of servlets it would be greatly appreciative.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic