Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unknown Source error when trying to use jdbc to connect to Oracle 8.1.6.0.0 database

 
John-Philippe Verger
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new in Java, and I'm trying to write a Java application connecting to Oracle 8i Enterprise Edition Release 8.1.6.0.0 database. I download classes12.zip on Oracle site and I use it in my Java classpath.Here's my code:





When I compile this class (the classe ClasseDb2 above) on command-line with
, it works fine(there's no error message on command-line).But when , after the compilation, I want to launch the program with , the following error messages are displayed on command-line:


I don't know why I can compile but there's a problem when I want to run this class.
For precision, I join my tnsnames.ora:





Thanks you help



²
 
Henry Wong
author
Marshal
Pie
Posts: 21514
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why I can compile but there's a problem when I want to run this class.


During compilation, only the classes and jar files needed directly by the source files as used -- to resolve symbols, signatures, etc. The compiler doesn't bother checking if the class files and jar files, needed by the class files and jar files, are available and valid.

Henry
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are trying to use a thick oracle driver. i.e. There is a native library involved. Maybe you haven't installed the native components of Oracle. Hence the unsatisfied link error.

By installing Oracle client software (I can't help you with the exact information, but look for any Oracle software installation which includes thick driver installation) the issue will probably get resolved.

Alternatively try using a thin driver. i.e. pure java driver by using the following jdbc url.

jdbc:oracle:thin:@localhost:1521:JOHNDB

 
Campbell Ritchie
Sheriff
Pie
Posts: 50277
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch I think this thread would sit better on the JDBC forum, so shall move it.
I had to edit a post to get rid of a which I did by marking the "disable smilies" box.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic