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.SQLExc eption: Closed Connection
at oracle.jdbc.dba ccess.DBError.t hrowSqlExceptio n(DBError.java: 134)
at oracle.jdbc.dba ccess.DBError.t hrowSqlExceptio n(DBError.java: 179)
at oracle.jdbc.oci 8.OCIDBAccess.c heck_error(OCID BAccess.java:23 64)
at oracle.jdbc.oci 8.OCIDBAccess.l ogon(OCIDBAcces s.java:480)
at oracle.jdbc.dri ver.OracleConne ction.<init>(Or acleConnection. java:360)
at oracle.jdbc.dri ver.OracleDrive r.getConnection Instance(Oracle Driver.java:521 )
at oracle.jdbc.dri ver.OracleDrive r.connect(Oracl eDriver.java:32 5)
at java.sql.Driver Manager.getConn ection(DriverMa nager.java:517)
at java.sql.Driver Manager.getConn ection(DriverMa nager.java:177)
at TestOCI.main(Te stOCI.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_PAT H -> /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.s o (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.Or acleDriver";
private static final String URL = "jdbc:oracle:oc i8:@zool";
public static void main(String[] args) {
try {
Class.forName(D RIVER);
Connection con = DriverManager.g etConnection(UR L,"user", "pw");
Statement stmt = con.createState ment();
} catch (Exception e) {
e.printStackTra ce();
}
}
}
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 17862
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.SQLExc eption: Closed Connection at oracle.jdbc.dba ccess.DBError.t hrowSqlExceptio n(DBError.java: 134) at oracle.jdbc.dba ccess.DBError.t hrowSqlExceptio n(DBError.java: 179) at oracle.jdbc.oci 8.OCIDBAccess.c heck_error(OCID BAccess.java:23 64) at oracle.jdbc.oci 8.OCIDBAccess.l ogon(OCIDBAcces s.java:480) at oracle.jdbc.dri ver.OracleConne ction.<init>(Or acleConnection. java:360) at oracle.jdbc.dri ver.OracleDrive r.getConnection Instance(Oracle Driver.java:521 ) at oracle.jdbc.dri ver.OracleDrive r.connect(Oracl eDriver.java:32 5) at java.sql.Driver Manager.getConn ection(DriverMa nager.java:517) at java.sql.Driver Manager.getConn ection(DriverMa nager.java:177) at TestOCI.main(Te stOCI.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_PAT H -> /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.s o (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.Or acleDriver"; private static final String URL = "jdbc:oracle:oc i8:@zool";
public static void main(String[] args) {
try { Class.forName(D RIVER); Connection con = DriverManager.g etConnection(UR L,"user", "pw"); Statement stmt = con.createState ment(); } catch (Exception e) { e.printStackTra ce(); } } }
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_net scape.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: " . mysql_error());
echo "Connected successfully";
mysql_close($link);
|
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 ODBC For Oracle approach, I added a data source
in Oracle Data Source Administrator, in System DSN tab, I created
a system data source named...
|
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 reconnect_PACE_err
5210 Select Case curErr
Case 0
5221 curQD.Connect = !ConnectionString
|
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. ERROR Driver's
SQLSetConnectAttr failed ERROR Disk or network error
Oracle ODBC connection works fine under the same user so assuming this is...
| |
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. I tried that quickly, but
the file is 400 MB, and the the installation asks for all kinds of things in
order to install. Now I'm very confused....
|
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. I tried that quickly, but
the file is 400 MB, and the the installation asks for all kinds of things in
order to install. Now I'm very confused....
|
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 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
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 these services set to logon as LocalSystemAccount?
4) Do you get the same error when using JDBC oci driver?
BTW... Oracle 8.0 is desupported. If...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |