Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-4827

JDBC drivers: optimize classloader not to load drivers repeatedly

    Details

    • Branch:
    • QA Testing:
      GUI manual test
    • Additional information:
      Hide

      Configuration for Linux
      Start Clover with the following configuration (yo may need to update path depending on your Oracle 11g installation:

      #!/bin/bash
      . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
      export LD_LIBRARY_PATH=$ORACLE_HOME/lib/
      export JAVA_OPTS=-Doracle.net.tns_admin=$ORACLE_HOME/network/admin:$JAVA_OPTS
      /usr/bin/eclipse
      

      https://intranet.javlin.eu/wiki/doku.php?id=cloverkb:native_jdbc_drivers

      Show
      Configuration for Linux Start Clover with the following configuration (yo may need to update path depending on your Oracle 11g installation: #!/bin/bash . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh export LD_LIBRARY_PATH=$ORACLE_HOME/lib/ export JAVA_OPTS=-Doracle.net.tns_admin=$ORACLE_HOME/network/admin:$JAVA_OPTS /usr/bin/eclipse https://intranet.javlin.eu/wiki/doku.php?id=cloverkb:native_jdbc_drivers

      Description

      When accessing Oracle database via JDBC OCI client, it works fine in designer for the first time (e.g. select Browse database from connection's context menu). For the second time (e.g. select Extract Metadata from connection's context menu), I get error:

      Exception in thread "Thread-23" java.lang.UnsatisfiedLinkError: Native Library /u01/app/oracle/product/11.2.0/xe/lib/libocijdbc11.so already loaded in another classloader
      	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1772)
      	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
      	at java.lang.Runtime.loadLibrary0(Runtime.java:823)
      	at java.lang.System.loadLibrary(System.java:1028)
      	at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3535)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3531)
      	at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:266)
      	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)
      	at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
      	at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
      	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
      	at org.jetel.connection.jdbc.specific.conn.DefaultConnection.connect(DefaultConnection.java:474)
      	at org.jetel.connection.jdbc.specific.conn.DefaultConnection.<init>(DefaultConnection.java:81)
      	at org.jetel.connection.jdbc.specific.conn.DefaultConnection.<init>(DefaultConnection.java:75)
      	at org.jetel.connection.jdbc.specific.conn.OracleConnection.<init>(OracleConnection.java:38)
      	at org.jetel.connection.jdbc.specific.impl.OracleSpecific.createSQLConnection(OracleSpecific.java:67)
      	at org.jetel.connection.jdbc.DBConnection.connect(DBConnection.java:494)
      	at org.jetel.connection.jdbc.DBConnection.getConnection(DBConnection.java:470)
      	at org.jetel.connection.jdbc.DBConnection.getConnection(DBConnection.java:450)
      	at com.cloveretl.gui.editors.query.h.run(Unknown Source)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                salamonp Pavel Salamon
                Reporter:
                ulrychj Jan Ulrych (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days
                  3d