This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all I am able to compile the java file but when i try to run that it is giving me following error. Connecting to the database...Connecting... Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Oracle\Ora81\BIN\o cijdbc8.dll: One of the library files needed to run this application cannot be f ound at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Compiled Code) at java.lang.ClassLoader.loadLibrary(Compiled Code) at java.lang.Runtime.loadLibrary0(Runtime.java:470) at java.lang.System.loadLibrary(System.java:745) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:192) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:142) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja va:214) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193) at java.sql.DriverManager.getConnection(Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java:137) at JdbcCheckup.main(Compiled Code) Press any key to continue... my AUTOEXEC.bat file.
SET PATH=.;C:\JDK1.2\BIN;C:\JDK1.2\LIB;C:\JSDK2.0\BIN;C:\Oracle\Ora81\jdbc\lib\classes111;C:\Oracle\ora81\lib;C:\Oracle\Ora81\OCI\LIB;C:\Oracle\Ora81\BIN;C:\Oracle\Ora81\NETWORK\TNSAPI \BIN;C:\Oracle\Ora81\javavm\admin; SET CLASSPATH=.;C:\jdk1.2\jre\lib\rt.jar;C:\jsdk2.0\lib\jsdk.jar;C:jmms\Jsps\web-inf\classes;C:\Oracle\Ora81\jdbc\lib\classes111;C:\Oracle\Ora81\jdbc\lib\classess102; SET JAVA_HOME=C:\jdk1.2 SET TOMCAT_HOME = c:\jakarta-tomcat-3.2.1 SET ANT_HOME = E:\jakarta-tomcat SET PATH=%PATH%;"C:\PROGRAM;FILES\MTS"
From the Oracle docs: Error Message: "UnsatisfiedLinkError with OCI driver" When using Win NT, Win95 or Win98, the Java Virtual Machine complains that it cannot load OCI73JDBC.DLL, when one of the DLLs called by OCI73JDBC.DLL cannot be loaded. The JDBC OCI drivers use shared libraries that contain the C code portions of the driver. The library is OCI73JDBC.DLL for the Oracle7 client program. The shared library is normally installed in [ORACLE_HOME]\BIN when you install the JDBC driver from the distribution. Make sure that directory is in your PATH. Read the Installation section of the documentation for more details. The shared library also depends on other libraries. If any of those DLLs are missing, you will end up with an error saying OCI73JDBC.DLL is missing. JDBC OCI7 requires the following Oracle7 files: CORE35.DLL, CORE35O.DLL, NLSRTL32.DLL, and ORA73.DLL The Java Virtual Machine (JavaSoft JDK) is JAVAI.DLL. The Microsoft Visual C++ runtime is MSVCRT.DLL, MSVCRTI.DLL, MSVCRT20.DLL, and MSVCRT40.DLL. You can find the list of dependent DLLs by going to the Windows Explorer program, right-clicking on the DLL, and choosing Quick View. The Quick View screen shows, among other things, the Import Table which lists the dependent DLLs. You can reinstall missing required support files from the Oracle installation CD. Please install "Required Support Files 7.3.4", "SQL*Net Client 2.3.4 " and "Oracle TCP/IP Protocol Adapter 2.3.4".