Hello all,
I have been trying to use the OCI driver to connect to Oracle 9i, but
have been getting the following error:
java.sql.SQLException: Closed Connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAcce ss.java:2364)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.jav a:480)
at oracle.jdbc.driver.OracleConnection.<init>(OracleC onnection.java:360)
at oracle.jdbc.driver.OracleDriver.getConnectionInsta nce(OracleDriver.java:521)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:325)
at java.sql.DriverManager.getConnection(DriverManager .java:517)
at java.sql.DriverManager.getConnection(DriverManager .java:177)
at TestOCI.main(TestOCI.java:17)
Here's my setup:
.. Running on 'SunOS beavis 5.7 Generic_106541-17 sun4u sparc
SUNW,Ultra-5_10'
.. java version is 'Java(TM) 2 Runtime Environment, Standard Edition
(build 1.3.1-b24)'
.. echo $LD_LIBRARY_PATH -> /users/david/TestOCI/9.2.0.3:/oracle/lib
.. in the '9.2.0.3' directory, I have the following files:
classes12_g9203.zip, libheteroxa9.so, libheteroxa9_g.so,
libocijdbc9.so, libocijdbc9_g.so (downloaded from the oracle driver
section)
And the sample program that I run, TestOCI.java:
import java.sql.*;
public final class TestOCI {
private static final String DRIVER = "oracle.jdbc.OracleDriver";
private static final String URL = "jdbc:oracle:oci8:@zool";
public static void main(String[] args) {
try {
Class.forName(DRIVER);
Connection con = DriverManager.getConnection(URL,"user", "pw");
Statement stmt = con.createStatement();
} catch (Exception e) {
e.printStackTrace();
}
}
}
I have tried to change the URL to 'oci' instead of 'oci8', same
result. It does work perfectly if I use the thin driver however.
This is run with the classpath explicitely set to
'/users/david/TestOCI/9.2.0.3/classes12_g9203.zip:.'
I have also tried to run DbVisualizer (java client) against Oracle
with the same setup, and I get the very same exception.
Does anyone have a clue/pointer?
Thanks 3 17833
You need two more shared object files:
libclntsh.so.9.0
libwtc9.so
Cheers,
Dave
David wrote: Hello all,
I have been trying to use the OCI driver to connect to Oracle 9i, but have been getting the following error:
java.sql.SQLException: Closed Connection at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAcce ss.java:2364) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.jav a:480) at oracle.jdbc.driver.OracleConnection.<init>(OracleC onnection.java:360) at oracle.jdbc.driver.OracleDriver.getConnectionInsta nce(OracleDriver.java:521) at oracle.jdbc.driver.OracleDriver.connect(OracleDriv er.java:325) at java.sql.DriverManager.getConnection(DriverManager .java:517) at java.sql.DriverManager.getConnection(DriverManager .java:177) at TestOCI.main(TestOCI.java:17)
Here's my setup: . Running on 'SunOS beavis 5.7 Generic_106541-17 sun4u sparc SUNW,Ultra-5_10' . java version is 'Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)' . echo $LD_LIBRARY_PATH -> /users/david/TestOCI/9.2.0.3:/oracle/lib . in the '9.2.0.3' directory, I have the following files: classes12_g9203.zip, libheteroxa9.so, libheteroxa9_g.so, libocijdbc9.so, libocijdbc9_g.so (downloaded from the oracle driver section)
And the sample program that I run, TestOCI.java:
import java.sql.*; public final class TestOCI {
private static final String DRIVER = "oracle.jdbc.OracleDriver"; private static final String URL = "jdbc:oracle:oci8:@zool";
public static void main(String[] args) {
try { Class.forName(DRIVER); Connection con = DriverManager.getConnection(URL,"user", "pw"); Statement stmt = con.createStatement(); } catch (Exception e) { e.printStackTrace(); } } }
I have tried to change the URL to 'oci' instead of 'oci8', same result. It does work perfectly if I use the thin driver however. This is run with the classpath explicitely set to '/users/david/TestOCI/9.2.0.3/classes12_g9203.zip:.' I have also tried to run DbVisualizer (java client) against Oracle with the same setup, and I get the very same exception.
Does anyone have a clue/pointer? Thanks
Dave Hau <davehau_nospam_123@nospam_netscape.net> wrote in message news:<3EF76D38.2040704@nospam_netscape.net>... You need two more shared object files:
libclntsh.so.9.0 libwtc9.so
Thanks, but it doesn't seem to be the problem since I do have these
files in /oracle/lib (which is in my LD_LIBRARY_PATH).
Hi David,
have you found any solution for your problem? I have exectly the same problem now and I don't know how to solve it. Can you help me?
Thanks
Vojta
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mr Dygi |
last post by:
Hi,
PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a
problem with this simple code:
<?php
$link = mysql_connect("127.0.0.1","","")
or die("Could not connect: " ....
|
by: CM |
last post by:
Hi,
when i want connect me in my BD with a JSP (with this simple code),
this exception is throw.
Thank's for ur help
Mathieu
CODE of my JSP
---------------------
|
by: jrefactors |
last post by:
My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle
are in the same box.
I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle,
but both not working.
For Microsoft...
|
by: PeteCresswell |
last post by:
I'm doing this:
---------------------------------------------------------
5200 Case "Query"
On Error Resume Next
Set curQD = thisDB.QueryDefs(!ObjectName)
curErr = Err
On Error GoTo...
|
by: stueyh |
last post by:
When attempting to connect to an Access 2000 DB using ADO.Net from within
ASP.Net running under an impersonated local user account receiving the
following error.
ERROR Disk or network
error....
|
by: D. Patrick |
last post by:
I need to connect to an Oracle database. I've never done it before. I
see that with framework 1.1 you had to download ODP.NET from Oracle's site
in order for the framework classes to even work....
|
by: D. Patrick |
last post by:
I need to connect to an Oracle database. I've never done it before. I
see that with framework 1.1 you had to download ODP.NET from Oracle's site
in order for the framework classes to even work....
|
by: David |
last post by:
Hello all,
I have been trying to use the OCI driver to connect to Oracle 9i, but
have been getting the following error:
java.sql.SQLException: Closed Connection
at...
|
by: Rauf Sarwar |
last post by:
"hilz" <hs_74@hotmail.comwrote in message news:<K7-dnfyIdLwmV2qjXTWcqA@speakeasy.net>...
1) Did you install Oracle as an Administrator?
2) Are all these three services set to Automatic?
3) Are...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |