• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets/JDBC

 
Shekhar Tayade
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.
 
Ashwin Desai
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.
 
Dan, Jackson
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic