8 Replies Latest reply on Jul 27, 2004 9:51 PM by adrian.brock

    Oracle Datasource with OCI drivers

    sreek

      Hi:

      I am not able to configure datasource with Oracle OCI drivers in Jboss 3.2.5 server running in Redhat Linux 9 environemnt. I installed Oracle client software and able to use sqlplus to server. Also set LD_LIBRARY_PATH to $ORACLE_HOME/rdbms/lib:$ORACLE_HOME/jdbc/lib
      in jboss startup script. But I am getting follwoing error during startup.

      10:58:07,254 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
      at java.lang.Runtime.loadLibrary0(Runtime.java:788)
      at java.lang.System.loadLibrary(System.java:834)
      at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:265)
      at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:362)
      at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:536)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:328)
      ...............


      Do I need to do any additional configuration to use Oracle OCI drivers for Datasource.

      Thanks in advance.

        • 1. Re: Oracle Datasource with OCI drivers
          darranl

          Have you put the JDBC driver in /server/default/lib? (Assuming that you are running the default config)

          • 2. Re: Oracle Datasource with OCI drivers

            I haven't used OCI in a while, so this may be wrong, but if I remember correctly, you need to add the directory that contains whatever.dll to your path.

            I'm guessing you'll find a ocijdbc9.dll somewhere on your machine.

            • 3. Re: Oracle Datasource with OCI drivers

              As you can see, he already has the necessary Oracle Java classes in his classpath:

              at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:265)

              • 4. Re: Oracle Datasource with OCI drivers
                sreek

                Yes I have oracle jdbc drivers (ojdbc14_g.jar) in server/all/lib folder. If I use thin driver everything is fine, but I want to use OCI drivers. I added path ($ORACLE_HOME/lib) where ocijdbc9.so file in LD_LIBRARY_PATH. I wanted to find out what are configuration is required to get OCI drivers wok for datasource.

                Thanks

                • 5. Re: Oracle Datasource with OCI drivers

                  Is it still not working?

                  • 6. Re: Oracle Datasource with OCI drivers
                    sreek

                    no I am not able to get OCI drviers working on linux box. Winxp box is working fine with ouy any issues.

                    I think there is some extra configuration required on linux box. If any body using Oracle OCI drivers for datasource on linux (redhat 9.0), post the config details.

                    Thanks

                    • 7. Re: Oracle Datasource with OCI drivers

                      Well, native stuff for Linux is going to include a .so or somesuch thing on the box. You'll need to add its directory to your PATH.

                      Windows native uses a .dll, Linux native uses a .so. There's gotta be some docs on the Oracle site on how to do it right.

                      • 8. Re: Oracle Datasource with OCI drivers

                        First thing I would check is:

                        System.out.println(System.getProperty("java.library.path"));
                        


                        Then check spellings/case/authorities/etc.

                        Taking you literally (assuming you are a windows head :-) ...
                        replace
                        SET LD_LIBRARY_PATH=$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/jdbc/lib
                        with
                        EXPORT LD_LIBRARY_PATH=$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/jdbc/lib

                        I would then consider whether basic VM config and Unix scripting is relevent to this forum.
                        It is certainly better placed in the Oracle/Linux forums.