Java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path

Hello
i am getting this unsatisfied error whenever i use servlet & in my servlet i am using JDBC for connecting to Oracle.
i need to know the solution for this please do let me know . Also do i need to know the JDBC re-alm set-up in Tomcat server.
java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:83)
at java.sql.DriverManager.getConnection(DriverManager.java:126)
at sdsi.sdsi.doGet(sdsi.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java)

Make sure the oracle library ($ORACLE_HOME/lib) is included in the LD_LIBRARY_PATH.
Or, you can use JDBC thin driver instead of OCI driver.

Similar Messages

  • JDBC+Lite+WinCE : java.lang.UnsatisfiedLinkError: no oljdbc40 in shared library path

    Greetings,
    I'm trying to work with Oracle 9i Lite on PocketPC and I got one
    exception when I try to use jdbc package (oljdbc40.jar):
    java.lang.UnsatisfiedLinkError: no oljdbc40 in shared library
    path
    Since I didn't made the dll (is an Oracle product), I can't make
    much about the dll or the native class file where the call take
    place.
    my standard definitions are:
    -PocketPC (ipaq)
    -Personal Java 1.1 beta
    -I have my application in a JAR-based file in "\Program
    Files\App"
    -Oracle Lite installation in "\ORACE";
    -dll files installed by oracle in "\Windows";
    -wince registry classpath for JAR/CLASS file aimed
    to "\ORACE\oljdbc40.jar"
    So, what should I do to run my application that uses a jdbc
    package from oracle based on a dll file?
    I'm hopeful to solve this and avoid my thought from using any
    Microsoft Visual tool...
    thanks,
    Pedro Salazar

    Hi Pedro,
    Did you ever get this problem fixed? I'm seeing the same issue running Personal Java 1.1 beta for StrongARM on PocketPC 2000 with Oracle 9i Lite 5.0.2
    Any help much appreciated!
    Thanks,
    Simon.

  • Java.lang.UnsatisfiedLinkError: no msawt in shared library path

    I am using IE5.5 on Windows 98SE, and every time I try to run an applet, I get the error "java.lang.UnsatisfiedLinkError: no msawt in shared library path" I have installed the JDK/JRE, but it has not done anything. I discovered that I was missing msawt.dll from my windows/system folder, but when I got it, it had no effect on the error message. I have gotten the same applets to run on other win98/IE5.5 machines. I read of this same problem in a linux forum somewhere, but nobody had a solution. What should I do? Thanks.

    Well, as tacky as it is to reply with the solution to my own problem, I found that installing a newer version of Microsoft's Java Virtual Machine, free from Microsoft's site, helped elminate that error. Perhaps this will help someone else.

  • Solution of "no ocijdbc8 in shared library path" Windows95 Jdeveloper 3.0

    I installed Jdeveloper 3.0 and got the message "no ocijdbc8 in shared library path".
    We are using Oracle 8.0.5 so I had Oracle 8.0.5 client in my PC.
    1. I down loaded oci805jdbc.dll, oci805jdbc_g.dll and put my c:\orawin95\bin directory. The PATH contains the directory.
    2. Then I tested the dll with the following program: (provided with sombody else in this discussion forum.)
    public class Test4 {
    public static void main (String [] args)
    try
    System.loadLibrary("oci805jdbc");
    System.out.println("Successfully Loaded");
    } catch(Exception e)
    System.out.println("LD_LIBRARY_PATH is not properly set");
    e.printStackTrace();
    The output:
    Successfully Loaded
    I tried the following too (ocijdbc8.dll exists in c:\orawin95\bin directory):
    public class Test {
    public static void main (String [] args)
    try
    System.loadLibrary("ocijdbc8");
    System.out.println("Successfully Loaded");
    } catch(Exception e)
    System.out.println("LD_LIBRARY_PATH is not properly set");
    e.printStackTrace();
    The output:
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library path
    May be I need Oracle 8.1.5 client or the dll is corrupted?
    3. I modified my Jdeveloper.ini file (changed jdbc lib: 8.1.5 to 8.0.5:
    Original row:
    [Java_Global]
    IDEClassPath=..\lib\jdeveloper.zip;..\lib\jdev-rt.zip;..\lib\jbcl2.0.zip;..\lib\jgl3.1.0.jar;..\sqlj\lib\translator.zip;..\aurora\lib\aurora_client.jar;..\aurora\lib\jasper.zip;..\ aurora\lib\vbjtools.jar;..\aurora\lib\vbjorb.jar;..\aurora\lib\vbjapp.jar;..\aurora\lib\vbj30ssl.jar;..\aurora\lib\aurora.zip;..\jdbc\lib\oracle8.1.5\classes111.zip;..\lib\javax_ej b.zip;..\lib\jndi.jar;..\lib\netasst.jar;..\lib\jsp2java.jar;..\lib\jsdk.jar;..\lib\oasdeploy.jar;..\lib\f60all.jar;..\lib\jbodatum.zip;..\lib\jbomt.zip;..\lib\jbovb.zip;..\lib\jbo o8i.zip;..\lib\jboejb.jar;..\lib\jbodt.zip;..\lib\jbotester.zip;..\lib\xmlparserv2.jar;..\lib\dacf.zip;..\lib\dacfdt.zip;..\infobus\lib\infobus.jar;..\lib\LW_pfjbean.jar
    Modified row:
    [Java_Global]
    IDEClassPath=..\lib\jdeveloper.zip;..\lib\jdev-rt.zip;..\lib\jbcl2.0.zip;..\lib\jgl3.1.0.jar;..\sqlj\lib\translator.zip;..\aurora\lib\aurora_client.jar;..\aurora\lib\jasper.zip;..\ aurora\lib\vbjtools.jar;..\aurora\lib\vbjorb.jar;..\aurora\lib\vbjapp.jar;..\aurora\lib\vbj30ssl.jar;..\aurora\lib\aurora.zip;..\jdbc\lib\oracle8.0.5\classes111.zip;..\lib\javax_ej b.zip;..\lib\jndi.jar;..\lib\netasst.jar;..\lib\jsp2java.jar;..\lib\jsdk.jar;..\lib\oasdeploy.jar;..\lib\f60all.jar;..\lib\jbodatum.zip;..\lib\jbomt.zip;..\lib\jbovb.zip;..\lib\jbo o8i.zip;..\lib\jboejb.jar;..\lib\jbodt.zip;..\lib\jbotester.zip;..\lib\xmlparserv2.jar;..\lib\dacf.zip;..\lib\dacfdt.zip;..\infobus\lib\infobus.jar;..\lib\LW_pfjbean.jar
    I am sure that the actual ..\jdbc\.. \lib\classes111.zip (or classes12 in java2) responsible for the ocijdbc8/oci805jdbc etc calling.
    The OracleDriver.class contains the name of the dll without the .dll extension.
    With this parameter is called the system.loadLibrary method!
    Importent:
    USE THE APPROPIATE ORACLE CLIENT (appropiate ocijdbc.dll)!
    USE THE APPROPIATE classes111.zip,
    (classes12.zip)!
    Manual setup using sqlj from DOS promt:
    set CLASSPATH=.;c:\orawin95\LITE\CLASSES\OLJDK11.JAR;c:\orawin95\LITE\CLASSES\OLITE40.JAR;d:\jdev\sqlj\lib\runtime.zip;d:\jdev\sqlj\lib\translator.zip;d:\jdev\jdbc\lib\oracle8.0.5\clas ses111.zip;d:\jdev\sqlj\lib\translator.zip;d:\jdev\java\lib\classes.zip;d:\jdev\jdbc\lib\oracle8.1.5\nls_charset11.zip;c:\orawin95\bin
    PATH C:\ORAWIN95\bin;d:\mgwin\bin;d:\bcc55;d:\bcc55\bin;d:\TC;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WNETFIN;C:\PROGRA~1\PERSON~1;C:\PSM;C:\WINDOWS\UTILS;d:\jdev\java\bin;d:\jdev\bin;d:\jdev\ jdbc\lib
    Good Luck!
    Otto
    [email protected]
    [email protected]
    null

    nstall the Oracle8i client on your machine, and make sure that
    <ORACLE_HOME> is set correctly. (From The Tools->IDE Options and click on the
    environment TAB ) and select an ORACLE_HOME from the List Box)
    or
    Exit from JDeveloper and edit the jdeveloper.ini file which is located in
    <J Developer Home>\bin.
    Modify the entries:
    JLP=-Djava.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin
    SLP=-Dsun.boot.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin
    to include the Oracle Bin directory. For example:
    JLP=-Djava.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin;D:\ORA8i\BIN
    SLP=-Dsun.boot.library.path=.;%JAVA_ROOT%\bin;%JAVA_ROOT%\jre\bin;D:\ORA8i\BIN

  • Java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path

    hi,
    i am trying to connect to an oracle 8.1.7 database from my application running on tomcat 4.0.3 / jdk1.4 /windows nt.
    using the thin jdbc-driver (classes12.zip) everything works fine.
    when i try using the oci8-driver, i get an error-message saying:
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    i have the oracle-client installed on my machine.
    the ocijdbc8.dll can be found in D:\server\oracla81\bin
    the environment-variables PATH, CLASSPATH, LD_LIBRARY_PATH (i'm not sure if this has any meaning on nt) all point to this directory.
    i start tomcat using the following option: -Djava.library.path="D:\server\oracla81\bin"
    my application can see this variable:
    System.out.println("java.library.path: "+System.getProperty("java.library.path"));
    prints out the correct value.
    then i try to load the library by myself:
    try {
    System.loadLibrary("ocijdbc8");
    System.out.println("Successfully Loaded");
    } catch(Exception e) {
    System.out.println("LD_LIBRARY_PATH is not properly set");
    e.printStackTrace();
    everything works fine! the library is loaded!
    finally i try to connect to the database and the application throws the mentioned exception:
    lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1410)
         at java.lang.Runtime.loadLibrary0(Runtime.java:772)
         at java.lang.System.loadLibrary(System.java:832)
         at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:228)
         at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:249)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    any help would be appreciated.
    thanx in advance,
    frank.
    [email protected]

    It is probably JDK 1.4 that causes the problem. I was able to get strange errors with that version of the JDK with code that worked fine using 1.31.

  • Java.lang.UnsatisfiedLinkError: no ocijdbc8 in java

    hi!
    i've tried to run entity-bean with jboss and store it into oracle-db
    this is what i get: java.lang.UnsatisfiedLinkError: no ocijdbc8 in java
    what is ocijdbc8.dll where can i get it, and where must i put it

    Hi,
    I have the same problem - i.e my java.library.path is not setup so I can use the jdbcoci8 driver. I thought all I needed to do was set LD_LIBRARY_PATH to point to the $9iAS_HOME/lib/libocijdbc8.so. But this is not working.
    How do I set java.library.path?
    Thanks for the help,
    Kendall

  • Java.lang.UnsatisfiedLinkError: no ocijdbc8

    I received the java.lang.UnsatisfiedLinkError: no ocijdbc8 error while running the following command:
    java OracleXML putXML -user xxx/xxx .....
    I saw a few posts regarding dll files for NT but nothing for AIX.
    Any help would be greatly appreciated.
    Thanks,
    John

    Hi Jinyu,
    Here are the things I was checking for to fix this error.
    I made sure the xsu12.jar and classes12.zip file were in the classpath, and they are.
    I made sure the directory that contains the libocijdbc8.so library was in the classpath. It wasn't so I added it.
    I added the directory that holds the libocijdbc8.so library to the LD_LIBRARY_PATH env variable.
    Thanks,
    John

  • Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.l

    I always get the same error when I try to use the Oracle JDBC drivers for connection to my Oracle database. I am new to the Java Programming arena so I feel that this may be an installation problem. Some very good questions for anyone reading this would be:
    1. How do I set the java.library.path
    2. what exactly is the ocijdbc8, I am guessing this is the oci8 folder downloaded with the Oracle Drivers.
    I need help configuring.
    null

    To help answer your question, I would need to know what if you are using NT, Linux, etc.. There are installation instructions for Java at http://java.sun.com/j2se/. For the Oracle JDBC drivers, generally you add the location of where you have stored the classes111.zip or classes12.zip to your classpath. That is all you need if you use the thin driver. If you use the ICO driver, you will also need to install the Oracle client from your Oracle distribution CD.

  • No ocijdbc8 in shared library path

    I'm working on HP UX 11. Trying to get Configurator 11i to work. My path variables look OK. Why are my "libcz.so" and "libczjni.so" files named "libcz.sl" and "libczjni.sl"? Is there a post-installation step I missed?

    You need to install the Oracle8i client on your machine, or make sure that <ORACLE_HOME> is set correctly

  • Ocijdbc8 not in shared library path for httpd

    I get the following error when running jdbc OCI drivers against
    oracle 8.1.5 on RH linux. LD_LIBRARY_PATH is set properly and
    works as user oracle However,the jdbc is running in a web
    application server (IBM Websphere) as user "nobody". Any ideas
    how shared path is set in this case?
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library
    path at java.lang.Runtime.loadLibrary(Compiled Code) at
    java.lang.System.loadLibrary(Compiled Code) at
    oracle.jdbc.oci8.OCIDBAccess.logon(Compiled Code) at
    oracle.jdbc.driver.OracleConnection.(Compiled Code) at
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
    Code) at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code) at
    java.sql.DriverManager.getConnection(Compiled Code) at
    Register.insertUser(Compiled Code) at Register.service(Compiled
    Code) at javax.servlet.http.HttpServlet.service(Compiled Code)
    at com.sun.server.ServletState.callService(Compiled Code) at
    com.sun.server.ServletManager.callServletService(Compiled Code)
    at com.ibm.servlet.engine.SEServletManager.callServletService
    (Compiled Code) at com.sun.server.http.InvokerServlet.service
    (Compiled Code) at javax.servlet.http.HttpServlet.service
    (Compiled Code) at com.sun.server.ServletState.callService
    (Compiled Code) at
    com.sun.server.ServletManager.callServletService(Compiled Code)
    at com.ibm.servlet.engine.SEServletManager.callServletService
    (Compiled Code) at
    com.sun.server.ProcessingState.invokeTargetServlet(Compiled
    Code) at com.sun.server.http.HttpProcessingState.execute
    (Compiled Code) at com.sun.server.http.stages.Runner.process
    (Compiled Code) at com.sun.server.ProcessingSupport.process
    (Compiled Code) at com.sun.server.Service.process(Compiled Code)
    at com.ibm.servlet.engine.SELauncher.processMultiThreaded
    (Compiled Code) at com.ibm.servlet.engine.SEEngine.service
    (Compiled Code) at com.ibm.servlet.engine.api.ServerEntry.service
    (Compiled Code) at
    com.ibm.servlet.engine.nativeEntry.NativeServerEntry.service
    (Compiled Code) at
    com.ibm.servlet.engine.outofproc.OutOfProcThread.run(Compiled
    Code)
    null

    Hi,
    I had the same problem and found ocijdbc8 from your messages.
    Now it is complaining about not finding oracore8.dll
    I am totally new to this JDBC world and I am really confused.
    Anyone knows where to find this file?
    Thanks!
    -- lam
    OliverD (guest) wrote:
    : Michael A. (guest) wrote:
    : : I get the following error when running jdbc OCI drivers
    : against
    : : oracle 8.1.5 on RH linux. LD_LIBRARY_PATH is set properly and
    : : works as user oracle However,the jdbc is running in a web
    : : application server (IBM Websphere) as user "nobody". Any
    : ideas
    : : how shared path is set in this case?
    : : java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared library
    : : path at java.lang.Runtime.loadLibrary(Compiled Code) at
    : : java.lang.System.loadLibrary(Compiled Code) at
    : : oracle.jdbc.oci8.OCIDBAccess.logon(Compiled Code) at
    : : oracle.jdbc.driver.OracleConnection.(Compiled Code) at
    oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled
    : : Code) at oracle.jdbc.driver.OracleDriver.connect(Compiled
    : Code)
    : : at java.sql.DriverManager.getConnection(Compiled Code) at
    : : java.sql.DriverManager.getConnection(Compiled Code) at
    : : Register.insertUser(Compiled Code) at Register.service
    : (Compiled
    : : Code) at javax.servlet.http.HttpServlet.service(Compiled
    Code)
    : : at com.sun.server.ServletState.callService(Compiled Code) at
    : : com.sun.server.ServletManager.callServletService(Compiled
    : Code)
    : : at com.ibm.servlet.engine.SEServletManager.callServletService
    : : (Compiled Code) at com.sun.server.http.InvokerServlet.service
    : : (Compiled Code) at javax.servlet.http.HttpServlet.service
    : : (Compiled Code) at com.sun.server.ServletState.callService
    : : (Compiled Code) at
    : : com.sun.server.ServletManager.callServletService(Compiled
    : Code)
    : : at com.ibm.servlet.engine.SEServletManager.callServletService
    : : (Compiled Code) at
    : : com.sun.server.ProcessingState.invokeTargetServlet(Compiled
    : : Code) at com.sun.server.http.HttpProcessingState.execute
    : : (Compiled Code) at com.sun.server.http.stages.Runner.process
    : : (Compiled Code) at com.sun.server.ProcessingSupport.process
    : : (Compiled Code) at com.sun.server.Service.process(Compiled
    : Code)
    : : at com.ibm.servlet.engine.SELauncher.processMultiThreaded
    : : (Compiled Code) at com.ibm.servlet.engine.SEEngine.service
    : : (Compiled Code) at
    : com.ibm.servlet.engine.api.ServerEntry.service
    : : (Compiled Code) at
    : : com.ibm.servlet.engine.nativeEntry.NativeServerEntry.service
    : : (Compiled Code) at
    : : com.ibm.servlet.engine.outofproc.OutOfProcThread.run(Compiled
    : : Code)
    : Hi Michael,
    : I had the same problems while I'm developing with SUN JDK1.3
    and
    : OCI8.
    : You can download the missing DLL 'ocijdbc8.dll' (packed in the
    : archive 'jdbc815jdk11x-nt.zip') from
    'http://technet.oracle.com/software/tech/java/sqlj_jdbc/software_
    : index.htm' with the link 'JDBC-OCI / NT for JDK 1.1.x'. Don't
    : worry about the header.
    : But now I have another problem:
    : Now java.exe misses another DLL: 'oracore.dll'. Do you have any
    : idea where I can find this one?
    : Best regards
    : Oliver
    null

  • No oci803jdbc in shared library path

    Env: Solaris 7, Oracle 8.1.6 client with JDBC
    Can someone explain why the 8.1.6 JDBC OCI driver is trying to load oci803jdbc.so instead of ocijdbc8.so?
    java -classpath .:/oracle816/jdbc/lib/classes111.zip Hello
    Connecting to database (jdbc:oracle:oci8:@geis) ...
    java.lang.UnsatisfiedLinkError: no oci803jdbc in shared library path
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Error.<init>(Compiled Code)
    at java.lang.LinkageError.<init>(Compiled Code)
    at java.lang.UnsatisfiedLinkError.<init>(Compiled Code)
    at java.lang.Runtime.loadLibrary(Compiled Code)
    at java.lang.System.loadLibrary(Compiled Code)
    at oracle.jdbc.oci7.OCIDBAccess.logon(Compiled Code)
    at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
    at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at java.sql.DriverManager.getConnection(Compiled Code)
    at Hello.main(Compiled Code)
    talus ~/java/geis 4 % echo $LD_LIBRARY_PATH
    /oracle816/lib:/oracle816/jdbc/lib
    import java.sql.*;
    import java.io.*;
    import java.util.Properties;
    import oracle.jdbc.driver.*;
    class Hello
    static final String url = "jdbc:oracle:oci8:@geis";
    static final String user = "scott";
    static final String pswd = "tiger";
    public static void main(String args[])
    throws SQLException
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    System.out.println("Connecting to database (" + url + ") ... ");
    Connection conn = DriverManager.getConnection(url, user, pswd);
    System.out.println("Connected.");
    DatabaseMetaData dbmd = conn.getMetaData();
    System.out.println("Driver name: " + dbmd.getDriverName() +
    " " + dbmd.getDriverVersion());
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery("SELECT 'Hello World' FROM dual");
    while (rset.next()) {
    System.out.println(rset.getString(1));
    System.out.println("Your JDBC installation is correct.");
    CallableStatement cstmt =
    conn.prepareCall("{call dbms_output.enable()}");
    cstmt.execute();
    cstmt.close();
    System.out.println("DBMS output enabled");
    }

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alan (Oracle):
    Based on the fact that you've posted other comments later than this one, I assume you've gotten past this problem.<HR></BLOCKQUOTE>
    So what is the solution?
    null

  • Java.lang.UnsatisfiedLinkError when loading libaries

    Hi,
    I coded an ejb, in which I want to call funtionality coming from a dll via JNI.
    In order to achieve it I copied the libary 'XXX.dll' to the windows directory system32
    and call in my ejb : System.loadLibary("XXX").
    The following exception occured:
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: no XXX in java.library.path
    Can anybody help me by saying
    1) where to put the .dll and what path to set in calling System.loadLibary(...)
    3) or even where and how to set the java.libary.path variable (Instance Template via configtool?)
    Honour and points are garanteed.
    Jens

    Hi,
    Check This,
    File f = new File("C:");
    System.out.println(f + " \t" + f.exists());
    f = new File(f, "sampleDLL2");
    System.out.println(f + " \t" + f.exists());
    System.load( f.toString() );
    When the library can not be found, you get a java.lang.UnsatisfiedLinkError with the message "no library in java.library.path". To solve this, move the library in one of the directories specified by java.library.path or alter the property so that it points to the directory containing your library. You can print this property with the following code:
    1: System.out.println(System.getProperty("java.library.path"));
    Another possibility when things do not work is when the DLL can be found, but the methods can not. A DLL exports functions according to specific names an calling conventions. When your compiler is not configured the right way your methods may get anther name than they should be. To solve this, you should include the header file generated by javah and configure your compiler the right way.
    Thanks,
    gopal

  • Java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path

    Hi,
    I'm using Java 1.5 with Oracle 10g on a Mac 10.5.6 and trying to use the OCI cilent. Sadly, I'm getting the following error
    Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:993)
    at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3147)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3143)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132) at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at com.caucho.sql.DriverConfig.createDriverConnection(DriverConfig.java:567)
    at com.caucho.sql.ManagedConnectionImpl.initDriverConnection(ManagedConnectionImpl.java:242) at com.caucho.sql.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:131)
    at com.caucho.sql.ManagedFactoryImpl.createManagedConnection(ManagedFactoryImpl.java:121) at com.caucho.jca.ConnectionPool.create(ConnectionPool.java:792)
    at com.caucho.jca.ConnectionPool.allocatePool(ConnectionPool.java:661) at com.caucho.jca.ConnectionPool.allocate(ConnectionPool.java:620)
    ... 23 more
    My database connection string is
    jdbc:oracle:oci:@test-database:1521:orcl11
    I am using a Resin 3.0.19 app server, and the java.library.path I set it to is /opt/oracle:/opt/oracle/lib. Here are the contents of those directories
    /opt/oracle:
    bin     lib     network     ord     sqlj
    /opt/oracle/lib
    README_IC.htm          libheteroxa10.dylib     libocijdbc10.dylib     orai18n.jar
    classes12.jar          libnnz10.dylib          libsqlplus.dylib     sqlplus
    glogin.sql          libocci.dylib.10.1     ocrs12.jar
    libclntsh.dylib.10.1     libociei.dylib          ojdbc14.jar
    Any ideas for further troubleshooting? Thanks, - Dave

    The oci library must be in the shared library path of the platform. Simple as that.
    Do you have that library(ocijdbc10) installed? On platforms besides MAC a client install of the Oracle GUI allows for it.

  • DBCA fails with java.lang.UnsatisfiedLinkError: Can't load library: /u01/oracle/prod/tech_st/product/11.2.0/db_1/oui/lib/linux/liboraInstaller.so Error in Oracle 11g

    Hi,
    After ORACLE 11G software installation i tried to change the ORACLE_HOME directory.
    OS : RHEL 4.5
    DB : 11.2.0
    Previous Home Location :
    [oracle@localhost ~]$ echo $ORACLE_HOME
    /u01/oracle/prod/tech_st/product/11.2.0/db_1
    Current Home Loc:
    [oracle@localhost ~]$ echo $ORACLE_HOME
    /u01/oracle/db/tech_st/product/11.2.0/db_1
    When i am trying the DBCA command i am getting the below error:
    [oracle@localhost ~]$ dbca
    java.lang.UnsatisfiedLinkError: Can't load library: /u01/oracle/prod/tech_st/product/11.2.0/db_1/oui/lib/linux/liboraInstaller.so
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
            at java.lang.Runtime.load0(Runtime.java:769)
            at java.lang.System.load(System.java:968)
            at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:387)
            at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:122)
            at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment.java:201)
            at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.initUnixPtrFileLoc(OiipgPropertyLoader.java:212)
            at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.<clinit>(OiipgPropertyLoader.java:125)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.updateProperties(OiicStandardInventorySession.java:492)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:266)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:240)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:189)
            at oracle.sysman.assistants.util.InventoryUtil.getOUIInvSession(InventoryUtil.java:346)
            at oracle.sysman.assistants.util.InventoryUtil.getHomeName(InventoryUtil.java:87)
            at oracle.sysman.assistants.util.OracleHome.getInventoryHomeName(OracleHome.java:1023)
            at oracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:798)
            at oracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:257)
            at oracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveHost.java:54)
            at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:164)
            at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:112)
            at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:184)
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
            at java.lang.Runtime.loadLibrary0(Runtime.java:822)
            at java.lang.System.loadLibrary(System.java:993)
            at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.loadNativeLib(OiipuUnixOps.java:405)
            at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.<clinit>(OiipuUnixOps.java:122)
            at oracle.sysman.oii.oiip.oiipg.OiipgEnvironment.getEnv(OiipgEnvironment.java:201)
            at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.initUnixPtrFileLoc(OiipgPropertyLoader.java:212)
            at oracle.sysman.oii.oiip.oiipg.OiipgPropertyLoader.<clinit>(OiipgPropertyLoader.java:125)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.updateProperties(OiicStandardInventorySession.java:492)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:266)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:240)
            at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:189)
            at oracle.sysman.assistants.util.InventoryUtil.getOUIInvSession(InventoryUtil.java:346)
            at oracle.sysman.assistants.util.InventoryUtil.getHomeName(InventoryUtil.java:87)
            at oracle.sysman.assistants.util.OracleHome.getInventoryHomeName(OracleHome.java:1023)
            at oracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:798)
            at oracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:257)
            at oracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveHost.java:54)
            at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:164)
            at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:112)
            at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:184)
    [oracle@localhost ~]$
    I tried all possible ways with google help but still i am facing the same issue.Kindly check and suggest to solve the issue.
    Thanks in advance.
    Vijay.

    Hi all,
    I give you the clear details about the issue what i am currently facing,
    1. I installed the 11g (11.2.0) database alone(No EBS) in my local vmware machine.
    2. Created my ORACLE_HOME under /u01/oracle/prod/tech_st/product/11.2.0/db_1 directory after that i tried to change my home location from /u01/oracle/prod/tech_st/product/11.2.0/db_1 location to /u01/oracle/db/tech_st/product/11.2.0/db_1 location, like created /u01/oracle/db directory and moved files from /u01/oracle/prod location.
    3. I changed my bash_profile and exported home with the modified location also deregistered an old home and registered the new home.
    4. When i am issuing echo $ORACLE_HOME it is showing the current home location and ORACLE_SID is same what i created before.
    5. But when i am trying to create one more db using DBCA utility it is through the above error.
    Please suggest me is it possible to change the location after db creation or any extra steps i have to do for this issue.
    Thanks.

  • HELP: java.lang.UnsatisfiedLinkError: no ... in java.library.path

    am the beginner of JNI. I write a test program to use C code in JAVA.
    [yxz155@lionxo JAVAaC]$ ls
    AClassWithNativeMethods.java theNativeMethod.c
    [yxz155@lionxo JAVAaC]$ javac AClassWithNativeMethods.java
    [yxz155@lionxo JAVAaC]$ javah -jni AClassWithNativeMethods
    [yxz155@lionxo JAVAaC]$ ls
    AClassWithNativeMethods.class AClassWithNativeMethods.java
    AClassWithNativeMethods.h theNativeMethod.c
    [yxz155@lionxo JAVAaC]$ gcc -c -fPIC -I/usr/global/java/include -I/usr/global/java/include/linux theNativeMethod.c
    [yxz155@lionxo JAVAaC]$ ls
    AClassWithNativeMethods.class AClassWithNativeMethods.java theNativeMethod.o
    AClassWithNativeMethods.h theNativeMethod.c
    [yxz155@lionxo JAVAaC]$ ld -G theNativeMethod.o -o libJCI.so -lm -lc -lpthread
    [yxz155@lionxo JAVAaC]$ ls
    AClassWithNativeMethods.class AClassWithNativeMethods.java theNativeMethod.c
    AClassWithNativeMethods.h libJCI.so theNativeMethod.o
    [yxz155@lionxo JAVAaC]$ java AClassWithNativeMethods
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no CJI in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:992)
    at AClassWithNativeMethods.<clinit>(AClassWithNativeMethods.java:9)
    [yxz155@lionxo JAVAaC]$
    The codes are as follows, I tried setProperty() as in java program, but it did not work. I also tried set LD_LIBRARY_PATH and it did not work either.
    //AClassWithNativeMethods.java
    import java.io.File;
    import java.lang.System;
    public class AClassWithNativeMethods{
    public native void theNativeMethod();
    static {
    //System.setProperty("java.library.path",System.getProperty("java.library.path")+ File.pathSeparator+"/home2/yxz155/JAVAaC");
    //System.out.println(System.getProperty("java.library.path"));
    System.loadLibrary("CJI");
    public static void main(String[] args){
    AClassWithNativeMethods test = new AClassWithNativeMethods ();
    test.theNativeMethod();
    // theNativeMethod.c
    #include <stdio.h>
    #include "AClassWithNativeMethods.h"
    JNIEXPORT void JNICALL Java_AClassWithNativeMethods_theNativeMethod
    (JNIEnv *env, jobject obj){
    printf("Hello~~~~");
    //AClassWithNativeMethods.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class AClassWithNativeMethods */
    #ifndef IncludedAClassWithNativeMethods
    #define IncludedAClassWithNativeMethods
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: AClassWithNativeMethods
    * Method: theNativeMethod
    * Signature: ()V
    JNIEXPORT void JNICALL Java_AClassWithNativeMethods_theNativeMethod
    (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endif

    Hi all,
    I am getting the error in jdk 5:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: getObjectSize0
    at sun.instrument.InstrumentationImpl.getObjectSize0(Native Method)
    at sun.instrument.InstrumentationImpl.getObjectSize(InstrumentationImpl.java:97)
    at ObjectSizeEstimator.main(ObjectSizeEstimator.java:25)
    while executing the following code:
    public class ObjectSizeEstimator {
    static {
    System.loadLibrary("instrument");
    public static void main(String[] args) throws Exception {
    Constructor ctor = InstrumentationImpl.class
    .getDeclaredConstructor(new Class[] { long.class, boolean.class });
    ctor.setAccessible(true);
    Instrumentation inst = (Instrumentation) ctor.newInstance(new Object[] {
    Long.valueOf(0L), Boolean.TRUE });
    System.out.println(inst.getObjectSize(new Object()));
    "getObjectSize0" is the native method. All of my classpath setting is in place. Can Anybody tell me why i am getting this error.
    Thanks in advance....:)

Maybe you are looking for

  • My lumia 720 battery problem

    last night I slept with my Lumia 720battery life remaining upto 52 percent .when next morning I woke up ifound that only 5% battery is remaning.how is that possible.i am in big worry,what has happento my Lumia 720 . please help

  • Help with Java.Sql package download

    I am compiling some java files with the following : import java.sql.* and getting errors. I realize I need the java.sql package. Can anyone help me by pointing out where I can download the package? Thanks. Murthy Gandikota

  • Itunes appears to update ipod but nothing transferred

    Though the computer recognized the ipod, Itunes did not. I did a restored on the ipod, upgraded both itunes and ipod. So now itunes "saw" the ipod and began the ipod setup assistant and then began "transferring" the songs to the ipod. The songs appea

  • Enabling all RAM for x64?

    I have a HP Touchsmart tx2 1020us with 4GB of RAM.  The machine shipped with 4GB of RAM and Windows Vista x64.  I have recently upgraded to Windows 7 and it shows 4.00GB installed and 3.75GB usable.  I've been around the block with the 3.xGB memory b

  • Displaying .ICO images in web browser

    I have a need to display .ICO icon images within the browser. I'm finding that in MSIE they don't always work and in Firefox they display but they are very blurred. I'm wondering if anybody is aware of anything built into CF that might fix this probl