Home » Developer & Programmer » JDeveloper, Java & XML » Oracle JDBC Thin - Connection refused
Oracle JDBC Thin - Connection refused [message #365482] Mon, 29 June 1998 18:18 Go to next message
Michael Villanueva
Messages: 2
Registered: June 1998
Junior Member
Hi! I'm trying to connect my Java program to Oracle using JDBC Thin driver and I'm getting a "Connection refused" error. I'm using Personal Oracle 7.2.2 and JDK 1.1.6. In my connect string I have:

DriverManager.getConnection("jdbc:oracle:thin:127.0.0.1:1521:orcl", scott", "tiger");

The specific oracle jdbc error message is:

oracle.jdbc.dbaccess.DBError.check_error(DBError.java.223)

Any ideas on what it means and how I can get it fixed?

Thanks
Re: Oracle JDBC Thin - Connection refused [message #365487 is a reply to message #365482] Tue, 30 June 1998 14:02 Go to previous messageGo to next message
Clara Welch
Messages: 6
Registered: June 1998
Junior Member
Michael:

I don't know if this is going to be much help to you, but I got the same error message using:
jdbc:oracle:thin:@www.handson.com:1521:ORCL","scott","tiger"

I gave up on the thin driver and started using the oci7 driver, but I never did get through to www.handson.com.

I recommend experimenting with a database that you have access to.

Keep in mind also that you probably need sqlnet and I had to have the proper entry in the tnsnames file to get my call to the JDBC driver to work.
Re: Oracle JDBC Thin - Connection refused [message #365491 is a reply to message #365487] Wed, 01 July 1998 18:14 Go to previous messageGo to next message
Michael Villanueva
Messages: 2
Registered: June 1998
Junior Member
Thanks Clara. I will try oci7 as you suggested. But I still would like to find out how to make it work because I was planning to write applets and would like to take advantage of the functionality of the thin driver.
I saw on comp.oracle.tools.newsgroups the same question and the answer given was "make sure the listener is listening".
I am using Personal Oracle on my desktop PC (Win95) and I can access the database through SQLPlus (which I am not sure whether this is an indication that the listener is up)
Anyway, I followed up the question and if I get any breakthroughs, I'll post it here for all to share.
Thanks again.
Re: Oracle JDBC Thin - Connection refused [message #365609 is a reply to message #365487] Mon, 15 March 1999 05:08 Go to previous messageGo to next message
Anand Chavan
Messages: 1
Registered: March 1999
Junior Member
I faced a similar statement. The log stated Connection refused
ROR = ( CODE = 12505) and some other stuff.
Does anybody know ROR or the meaning of this code. I don't have the documentation on JDBC Thin drivers exception codes. The exception is generated on getConnection by Throwable class.
Re: Oracle JDBC Thin - Connection refused [message #365615 is a reply to message #365491] Wed, 24 March 1999 14:47 Go to previous messageGo to next message
Clara Welch
Messages: 6
Registered: June 1998
Junior Member
Michael:

Just to let you know. I wasn't able to solve the problem with the Oracle Driver, instead myself, and a couple of co-workers converted all my code to Microsoft's COM Active X Data Objects. I have to use Microsoft Developer Studio - Type Library which I guess generated class stubs so that Java can all a DLL to connect to the Oracle database.
Of course, getting the thin drivers in an applet is a pure Java soluntion and that is a great thing. I was trying to go to Oracle from a Java application. As a point of interest, a group here at Marshall working on similar code was sucessful in going from Java application code to the Oracle Database using the Thin Driver, so it can be done.
Oracle JDBC Thin [message #365626 is a reply to message #365615] Tue, 20 April 1999 16:42 Go to previous messageGo to next message
Kamel Hamard
Messages: 1
Registered: April 1999
Junior Member
Hi,

I'm using Jdbc thin driver for connetion to Oracle 8.0.5 database. With the OCI8 with jdk 1.1.4. I want to use the jdk1.2 and the drivers Jdbc. Where can i found the version of jdbc fo jdk 1.2 for oravle 8.0.5.

A second problem, I want to use thin drivers with jdk1.2 but a have exception:

java.lang.NullPointerException
at oracle.jdbc.ttc7.TTCOutBuffer.add(TTCOutBuffer.java:129)
at oracle.jdbc.ttc7.TTIMsg.marshalUB1(TTIMsg.java:372)
at oracle.jdbc.ttc7.TTIpro.marshal(TTIpro.java:234)
at oracle.jdbc.ttc7.TTIpro.<INIT>(TTIpro.java:96)
at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1000)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:158)
at oracle.jdbc.driver.OracleConnection.<INIT>(OracleConnection.java:103)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:148)
at java.sql.DriverManager.getConnection(DriverManager.java:91)
at java.sql.DriverManager.getConnection(DriverManager.java:134)
at Employee.main(Employee.java:25)

Is it possible to use thin drivers of the jdk 1.1.4 version with the jdk 1.2

Thanks for any help.
Re: Oracle JDBC Thin - Connection refused [message #365628 is a reply to message #365487] Tue, 27 April 1999 10:43 Go to previous messageGo to next message
sboui
Messages: 2
Registered: April 1999
Junior Member
dear sir ,
i am student , i work on JDBC and i have an ORACLE
data base and i instaled SequeLink , can u help me : how to create JDBC driver ?

thank you very much in advance .

yours faithfuly tarek
Re: Oracle JDBC Thin - Connection refused [message #365631 is a reply to message #365491] Thu, 29 April 1999 04:50 Go to previous messageGo to next message
sboui
Messages: 2
Registered: April 1999
Junior Member
Dear sir ,
I am student from tunisia , i want to work with intersolv driver ,
i am working with JDBC .
It will be nice if u could help me :

- which driver you advise me to use and how ??
- how geting the connection ??
- my DBMS is oracle ; how to write the name of this DBMS ?

thank you in advance !
yours faithful tarek
Re: Oracle JDBC Thin [message #365676 is a reply to message #365626] Sun, 13 June 1999 21:25 Go to previous messageGo to next message
T.KARTHIKEYAN
Messages: 1
Registered: June 1999
Junior Member
Hello,
Pls give reply to the following,
1. Can I use jdbc oracle thin driver for Oracle Version 8.0.3 and Oracle Version 8.0.5 and what should be the version of that driver?
2. From where can I get this jdbc oracle thin driver?
3. Is that shareware, should I pay for it, if so how much and from where can I get it?
4. Else is it free, if so from where can I get it?

Thanking you,
T.karthikeyan
Re: Oracle JDBC Thin - Connection refused [message #365708 is a reply to message #365487] Tue, 28 September 1999 03:34 Go to previous messageGo to next message
the oracle
Messages: 5
Registered: September 1999
Location: Leicestershire
Junior Member
Connection refused is coming cuz your listener is not working or the name server cannot resolve the database name/ address.

If this is Personal Oracle, Check that u'r
TNSnames.ORA files match with the Listener.ORA

Edit the files is better as it gives u full control rather than the the use of a Net8 client to configure the thing.

Test u'r listener with ServerManager and
TNSlistener

This can be done at
Oracle_Home/BIN
SVRMGR30.exe or something
and
TNSLSNR80.exe

Good day
Re: Oracle JDBC Thin - Connection refused [message #365733 is a reply to message #365487] Mon, 29 November 1999 18:23 Go to previous messageGo to next message
Clara Welch
Messages: 6
Registered: June 1998
Junior Member
Just to clear up any future postings to my original reply.

I was trying three different versions of a Connection String.

1. host:port:sid
For example "jdbc:oracle:thin:256.128.64.32 where 256.128.64.32 is the IP of the host.
Problem: needed an "@" after the "thin:"
Error message: SQLException: Connection refused
Solution: use an "@" after the "thin:"

2. host:port:sid
For example "jdbc:oracle:thin:@ixta.us.oracle.com:1521:orcl"
Problem: name server couldn't resolve the database name/address ("The Oracle" pointed out this out in its reply to my posting).
Error message: SQLException: ixta.us.oracle.com
Solution: Used the numerical IP instead of a name.

3. (description=
(address_list=
(address=(protocol=tcp)(port=1600)(host=ixta.us.oracle.com))
(address=(protocol=tcp))port=1521)
(host=ajusco.us.oracle.com))
)
(connect_data=(sid=orcl))
(source_route-yes)
)
Problem: The "address= " fields were invalid. In one case, the name server couldn't resolve the database name/address, as described in problem #2 above. In the other case, the database name/address (host) had no SID of the value given, i.e. SID="orcle" didn't exist on host="ixta.us.oracle.com"
Error message: SQLException: Refused: OR=(CODE=12505)(EMFI=4)))) as described by Anand Chavan in replying to my posting.
Solution: "Jettisoned" the "address_list=" portion of the format string, included only one "address=" parameter, as follows:
(description=
(address=(protocol=tcp)(port=1600)(host=ixta.us.oracle.com))
)
(connect_data=(sid=orcl))
(source_route=yes)
)
Hope this is helpful to all who had an interest in this particular problem.
Re: Oracle JDBC Thin - Connection refused [message #365734 is a reply to message #365708] Mon, 29 November 1999 18:26 Go to previous messageGo to next message
Clara Welch
Messages: 6
Registered: June 1998
Junior Member
See my posting to my original message. You were right about the name server not being able to resolve the host name. When I used the IP address it worked.
Re: Oracle JDBC Thin - Connection refused [message #365735 is a reply to message #365609] Mon, 29 November 1999 18:30 Go to previous messageGo to next message
Clara Welch
Messages: 6
Registered: June 1998
Junior Member
I have retested my original code today, and reproduced the sort of error you describe above. I think that I had more than one error, so I'm not sure which one produced exactly that error.

I have replied to my own posting with the corrections that were necessary in order to get the code to work.

Maybe some of the things that I did will work for you also.

Good luck.

Clara
Connection refused [message #365993 is a reply to message #365487] Fri, 25 August 2000 10:55 Go to previous messageGo to next message
Iyyappan
Messages: 1
Registered: August 2000
Junior Member
hi

when i am going to connect the database in forms 4.5 i am refused and i got the error message "ORA-09365:Windows 3.1 Two_Task liver unable to destroy hidden window" . But the username and passwords are correct
How to connect to Oracle JDBC driver [message #366001 is a reply to message #365482] Wed, 06 September 2000 18:26 Go to previous messageGo to next message
helen
Messages: 13
Registered: September 2000
Junior Member
Hi,
I tried to write a java program in borland JBuilter to retrive data from Oracle8i. How can I find out the hostname and port number? What is sid? (url = "jdbc:oracle:thin:@hostname:portnumber:sid)

thanks
Oracle JDBC Thin - Connection refused [message #366146 is a reply to message #365482] Mon, 11 December 2000 08:19 Go to previous message
mamadou
Messages: 1
Registered: December 2000
Junior Member
When i use
String UR = "jdbc:oracle:thin:@bretagne:1521:devl";
I can't get a connection and the folowing errors are displayed

**
Connection refused: no further information
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:223)
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:100)
Previous Topic: how can i get the dateset from a oracle procudure?
Next Topic: java stored procedure
Goto Forum:
  


Current Time: Fri Nov 22 23:23:58 CST 2024