Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDBC Problem: Can't establish the connection

Re: JDBC Problem: Can't establish the connection

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Fri, 31 Oct 2003 03:19:43 GMT
Message-ID: <jxkob.7153$rp6.5706@news02.roc.ny>

"Soeren Frey" <junk_at_soerenfrey.de> wrote in message news:bnsdpj$15rf7o$1_at_ID-2052.news.uni-berlin.de...
> Hi,
>
> I have a problem connecting to a database using JDBC.
> I use the thin driver. I can connect to the
> database using SQLPlus. When I start the following program an
> SQLException is thrown:
> "java.sql.SQLException: E/A-Exception: The Network Adaper could not
> establish the connection"
> The simple propgram for testing is:
>
> ********************
> import java.sql.*;
>
> public class Applik1
> {
> public static void main(String[] args)
> throws ClassNotFoundException, SQLException
> {
> Class.forName("oracle.jdbc.driver.OracleDriver");
>
> String user = "scott";
> String password = "tiger";
> String database = "MeineDB";
> Connection conn =
> DriverManager.getConnection("jdbc:oracle:thin:@notebook:1521:"
> + database, user, password);
> }
> }
> ********************
>
> I use Win XP. "notebook" is the name of the computer (do I have to use
> something different ? It also doesn't work with "127.0.0.1").
> The listener is started. Firewall is disabled. I searched the net for
> several hours now but couldn't find a solution. I would be very
> grateful if someone could give me a hint.
>
> Greets
>
> Soeren
>

Can you post your listener.ora file. What host/IP have you specified there?

Anurag Received on Thu Oct 30 2003 - 21:19:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US