3 Replies Latest reply on May 29, 2003 6:04 AM by Jon Barnett

    JBoss3.2.1 and Oracle8i - Error : java.lang.UnsatisfiedLinkE

    peter1 Newbie

      Hi All,
      I need Help ....
      I am using Jboss 3.2.1 with Oracle 8i.
      I Have configured
      1)oracle-ds.xml
      2)standardjaws.xml
      3)web.xml
      4)jboss-web.xml

      classes111.zip & nls_charset11.zip are copied.

      I get the following error when my servlet calls ref1.getConnection()

      Code:
      javax.sql.DataSource ref1 = (javax.sql.DataSource)ctx.lookup("java:comp/env/jdbc/sjp1");
      java.sql.Connection conn = ref1.getConnection();

      Error Received:
      java.lang.UnsatisfiedLinkError: make_c_state
      at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
      at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:197)
      at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:142)

      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
      va:214)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
      reateManagedConnection(LocalManagedConnectionFactory.java:147)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
      eateConnection(InternalManagedConnectionPool.java:352)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
      tConnection(InternalManagedConnectionPool.java:151)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePo
      ol.getConnection(JBossManagedConnectionPool.java:643)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
      dConnection(BaseConnectionManager2.java:413)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
      nnection(TxConnectionManager.java:331)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
      onnection(BaseConnectionManager2.java:488)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
      nManagerProxy.allocateConnection(BaseConnectionManager2.java:798)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
      erDataSource.java:102)
      at JBoss_DbGetHotels.jndiWay1(JBoss_DbGetHotels.java:152)
      at JBoss_DbGetHotels.service(JBoss_DbGetHotels.java:52)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360
      )
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
      onHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
      58)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
      Context.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
      201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)



      Best Regards
      Peter Simpson

        • 1. Re: JBoss3.2.1 and Oracle8i - Error : java.lang.UnsatisfiedL
          Jon Barnett Master

          The Oracle OCI driver requires the native libraries in the path for things to work:
          If in Unix, this means the native libraries need to be in LD_LIBRARY_PATH
          If in Windows, this means they (the Oracle client dlls) have to be in the system path.

          -- Inserted explanation --
          If you are installing the JDBC OCI driver, you must also set the following value for the library path environment variable

          On Solaris\Ljnux\etc, set LD_LIBRARY_PATH as follows:
          [Oracle Home]/lib

          This directory contains the libocijdbc8.so shared object library.

          On Windows NT, set PATH as follows:
          [Oracle Home]\lib

          This directory contains the ocijdbc8.dll dynamic link library.

          Hope this helps.

          • 2. Re: JBoss3.2.1 and Oracle8i - Error : java.lang.UnsatisfiedL
            peter1 Newbie

            Hi,
            I am yet having the problem. It works fine with thin driver.
            (I am using win2k. and also I was able to connect to Weblogic5.1)


            By the way ocijdbc8.dll is in [Oracle Home]\bin and not in lib.
            I tried after setting the path for both folders.(In Env Variables)

            Should I set the same in run.bat of JBoss 3.2

            Thks in Advance
            Peter Simpson

            • 3. Re: JBoss3.2.1 and Oracle8i - Error : java.lang.UnsatisfiedL
              Jon Barnett Master

              The Path should contain whichever directory has the OCI dlls in them. You can try explicitly setting it in the run.bat. I'd also echo it to make sure by sight.

              I don't think there are any other tricks to get JNI to pick it up.

              Oh. Have you set the ORACLE_HOME variable as well?