ojdbc and clustered environments - how to connect
614339Dec 19 2007 — edited Jan 28 2010Hello there, I am hoping someone can help me out with the problem I'm having getting netbens 5.5.1 and 6 to connect to our databases.
First of alI, I am not a DBA, but a developer. I am trying to establish a connection with any of our databases in netbeans via a jdbc call. Every time try to use the jdbc:oracle:oci:@<service name>
It crashes with this error:
java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
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:3152)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3148)
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:474)
at org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:99)
at org.netbeans.modules.db.explorer.DatabaseConnection$2.run(DatabaseConnection.java:500)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
I have also tried jdbc:oracle:thin:@<host>:<port>:<SID> format and I get a different error:
I/O exception the adapter could not establish a connection to the server.
I will provide a sample of out tns entries:
SHDRD.#######.COM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = #######)(PORT = 1603))
(ADDRESS = (PROTOCOL = TCP)(HOST = #######)(PORT = 1603))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SHDRD.######.com)
(failover_mode =
(type = select)
(method = basic)
(retries = 20)
(delay = 15)
)
)
)
As you can see our tns entries contain multiple host, which I believe are the root cause to my issue. I cant even get SQL DEVELOPER to connect to the database. Are there special considerations I have to take in order to get my application working with servers?
BTW, I have tried the ojdbc14 and ondbc5 jars without luck.
Thanks guys!