• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ocijdbc10 driver

 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers. I want to connect my application with oracle 10.I am exporting LD_LIBRARY_PATH in profile
as follow from linux.
Am i exporting correct?

LD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/u01/app/oracle/product/10.2.0/db_1/lib
export LD_LIBRARY_PATH

PATH=$PATH::/u01/app/oracle/product/10.2.0/db_1/bin
export PATH

I also set the class path to the ojdbc14.jar file.But i am getting the following exception.Where I am wrong.

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a question: do you really need to use the OCI driver?
 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i need it because i have to use it.
 
Sandeep Sanaboyina
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really need to set the LIBRARY_PATH Using the driver jar in the classpath should be sufficient to connect to the DB.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep Sanaboyina wrote:Do you really need to set the LIBRARY_PATH Using the driver jar in the classpath should be sufficient to connect to the DB.

This is true, only if faisal is using a type 4 driver, which isn't the case.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
faisal hameed wrote:yes i need it because i have to use it.


Fair enough. I only ask because many people posting in this form are not aware of the differences.

I'm afraid I don;t have an answer to your problem. Assuming the OCI dependencies are in your PATH this should work. Have you checked what java.library.path actually includes?
 
Sandeep Sanaboyina
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:[This is true, only if faisal is using a type 4 driver, which isn't the case.

Did not know this... Nice learning though. Thanks .
 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using (java -server -classpath "lib/ts.jar:lib/ojdbc14.jar:lib/mail.jar:lib/activation.jar") this line in a file(Server.sh).
These jar files are in my lib folder and Server.sh and lib folder in same folder.
By executing Server.sh from terminal I am getting this exception.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
Now what i have to do?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. Have you logged what java.library.path is?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic