1 Reply Latest reply on Feb 24, 2010 11:53 AM by peterj

    Problem connecting to Oracle using OCI driver

      Hello,

       

      I would like to connect my datasource using the oracle jdbc oci driver to make some tests on failover modes.

      I installed an Oracle 11 client on my server and I change my oracle-ds.xml to something like that:

       

      <local-tx-datasource> 
              <jndi-name>DefaultDS</jndi-name> 
              <connection-url>jdbc:oracle:oci:@(DESCRIPTION=(xxx))</connection-url> 
              <user-name>xxxx</user-name> 
              <password>xxxx</password> 
              <min-pool-size>1</min-pool-size> 
              <max-pool-size>20</max-pool-size> 
              <query-timeout>60</query-timeout>  
              <driver-class>oracle.jdbc.OracleDriver</driver-class> 
              <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>  
              <metadata> 
                  <type-mapping>Oracle9i</type-mapping> 
              </metadata>

      </local-tx-datasource>

       

      Wen I start my jboss server, I have the following error:

       

      Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
              at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
              at java.lang.Runtime.loadLibrary0(Runtime.java:823)
              at java.lang.System.loadLibrary(System.java:1030)
              at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3171)
              at java.security.AccessController.doPrivileged(Native Method)
              at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3167)
              at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:233)
              at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
              at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
              at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465)
              at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
              ... 96 more

       

      I tried to add the path to the oracle .so library by adding the following option to my command line -Djava.library.path=/oracle/product/11.1.0/db_1/lib...

      But I still have the error...

       

      Does anybody have an idea?

       

      Many thanks,