This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hello, I tried to open two DB connections at the same time or one ofter the other (same driver, other URI), the 2nd attempt failed due to an exception. It seems that somehow every connection has its own ClassLoader or something like that. Maybe database drivers should be red by a higher level classloader. java.lang.UnsatisfiedLinkError: Native Library /usr/local/oracle/product/9.2.0/lib/libocijdbc9.so already loaded in another classloader at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1551) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:267) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:365) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347) at org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:82) at org.netbeans.modules.db.explorer.DatabaseConnection$2.run(DatabaseConnection.java:498) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Additional info: The same can be experienced on NB 4.1. SunOS fee 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Fire-V250 java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
Yes, you are right, we are using a different classloader for every connection. We already plan to fix it. Thanks for filing the issue!
I'm afraid this is too hard and time-consuming to fix for 5.5. It requires caching class loaders, or actually creating a single one, and it is not trivial to implement correctly.
... but it was not very difficult to implement the workaround in issue 76922, which mitigates the problem quite significantly. *** This issue has been marked as a duplicate of 76922 ***