wood burning stoves 2.0*
The moose likes JDBC and the fly likes Java, oracle on NT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java, oracle on NT" Watch "Java, oracle on NT" New topic
Author

Java, oracle on NT

javahelp
Greenhorn

Joined: Feb 01, 2001
Posts: 6
I have compiled program which is using Oracel drive to connect to oarcle database sitting on solaris. When i try to run the program i am getting following error.
Can some one hwlp me.
Thanks
C:\javawork>java Employee
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1290)
at java.lang.Runtime.loadLibrary0(Runtime.java:473)
at java.lang.System.loadLibrary(System.java:777)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:228)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java, Compiled Code)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at Employee.main(Employee.java, Compiled Code)
C:\javawork>
narayan kulkarni
Greenhorn

Joined: Jan 31, 2001
Posts: 17
I think the problem is probably with classpath
Check out with the classpath
Regards


Take up computer programming as fun and you will just enjoy it. Always keep in mind that in some way your program is going to make human life easier.
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
I think this is your PATH, not CLASSPATH. Make sure your PATH contains the path to ocijdbc8.dll. In my installation, it is located in c:\Oracle\Ora81\bin
javahelp
Greenhorn

Joined: Feb 01, 2001
Posts: 6
Originally posted by Michael Hildner:
I think this is your PATH, not CLASSPATH. Make sure your PATH contains the path to ocijdbc8.dll. In my installation, it is located in c:\Oracle\Ora81\bin

Yes my path and class paths are as followsC:\javawork>echo %path%
C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\WBEM;c:\jdk1.2.2\lib;c:\jdk1.2.2\bin;c:\jdk1.2.2;c:\tomcat\jakarta-tomcat-3
.2.1\bin;c:\tomcat\jakarta-tomcat-3.2.1\lib;c:\orant\oci8\jdbc\lib;c:\;c:\dos;c:\sunpc
C:\javawork>echo %classpath%
c:\orant\oci8\jdbc\lib\classes12.zip;c:\jdk1.2.2\bin;c:\tomcat\jakarta-tomcat-3.2.1\bin;c:\tomcat\jakarta-tomcat-3.2.1\lib
still it doesn't work
narayan kulkarni
Greenhorn

Joined: Jan 31, 2001
Posts: 17
When I used to encounter this sort of error I used to unzip the classes111.zip or classes*.zip and then put the resulting directory path in the classpath.
I usually used to extract classes.zip to in my webserver root directory
I am rusted because I am now not working in Java for 9 months
I canot tell you the exact classpath
so i think you can give this a try
Regards
Narayan
Seema Shetty
Greenhorn

Joined: Jan 23, 2001
Posts: 9
Hi,
For jdk1.2 and above, it is the path or classpath is not set for classes12.zip.If it is jdk1.1 and below, you should go for classes111.zip.
You should include the classpath upto the file zip file level like below.
C:\Oracle\Ora81\jdbc\lib\classes12.zip.
Good luck.
Mamta
Originally posted by javahelp:
I have compiled program which is using Oracel drive to connect to oarcle database sitting on solaris. When i try to run the program i am getting following error.
Can some one hwlp me.
Thanks
C:\javawork>java Employee
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1290)
at java.lang.Runtime.loadLibrary0(Runtime.java:473)
at java.lang.System.loadLibrary(System.java:777)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:228)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java, Compiled Code)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at Employee.main(Employee.java, Compiled Code)
C:\javawork>

suren
Greenhorn

Joined: Aug 10, 2001
Posts: 1
I had this problem on one of the machines and tried all the seetinfs for classpath and path mentioned on this message board and it didnt work. However when I reinstalled the Oracle8i client nad tried connecting to the remote database, it Worked !!!
Now I'm having the same problem while configuring other machine and its frustrating as I still dont know why it cant locate the dll file..I dont want to keep reinstalling the client everytime this happens grrrrrrr !
so who knows whats happening here !!! anyone ??

------------------
surent@qsipayments.com


surent@qsipayments.com
Frank Wu
Greenhorn

Joined: Jan 14, 2002
Posts: 25
set the LD_LIBRARY_PATH to include the $oracle_home\lib will do
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Originally posted by Frank Wu:
set the LD_LIBRARY_PATH to include the $oracle_home\lib will do

What is the LD_LIBRARY_PATH? How do I set it?
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
try this:
SET PATH = %PATH%;C:\orant\oci8\bin
I think that is what is missing from your path
 
Consider Paul's rocket mass heater.
 
subject: Java, oracle on NT