• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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



²
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Marshal
Posts: 76888
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic