Once upon a time ...
I was writing this message and tuning around with the JDBCTest (see below)
when strangely, somehow I got a connection .... what had happend?

Before running "java JDBCTest" I thought it might be a good idea to restart
the listener (via lsnctrl) on the oracle server. and voila: connection
established.

But before getting excited I played around a bit and explored the new realm
of JDBC connectivity.
This was the result:
I still get the same error if two applications try to connect simultaniously
to the oracle server. And if the exception has occured once I can only fix
the problem by restarting the oracle listener.

any ideas?
thanx a lot for your efforts so far,
stefan

details below:
* Here's the Connection String:
jdbc:oracle:thin:@213.252.17.216:1521:mmi

* Here's the exception:
Exception in thread "main" java.sql.SQLException: E/A-Exception: The Network
Adapter could not establish the connection
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
        at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
        at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
        at java.sql.DriverManager.getConnection(DriverManager.java:517)
        at java.sql.DriverManager.getConnection(DriverManager.java:177)
        at JDBCTest.main(JDBCTest.java:13)

* And the code that produces it (once in a while):
import java.sql.*;

class JDBCTest
{

  public static void main (String args [])
       throws SQLException
  {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

    // Connect to the database
    Connection conn =  DriverManager.getConnection
("jdbc:oracle:thin:@213.252.17.216:1521:mmi", "scott", "tiger");

    // Create a Statement
    Statement stmt = conn.createStatement ();

    // Select the ENAME column from the EMP table
    ResultSet rset = stmt.executeQuery ("select ENAME from EMP");

    // Iterate through the result and print the employee names
    while (rset.next ())
      System.out.println (rset.getString (1));
  }
}


Stefan Ri� ___  /\    __/\  /\___/\  __
Entwicklung   \/  \  /    \/       \/
                   \/
mediawave internet solutions GmbH
Tel.: +49 +89 350 190 92
Fax.: +49 +89 350 190 79
[EMAIL PROTECTED]


> -----Original Message-----
> From: Age Mooy [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 05, 2001 11:08 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Need Help: Which JDBC-Driver to use to connect to Oracle 8i
> (8.1.7)
>
>
>
> What is the value of <myOracleServer> ? An ip address ? An Oracle
> SID name ?
>
> How have you configured your database properties in the Turbine
> Resources properties ? Mine look like this
>
> database.default.driver=oracle.jdbc.driver.OracleDriver
> database.default.url=jdbc:oracle:thin:@192.168.0.250:1521:ORCL
> database.default.username=something
> database.default.password=whatever
>
> database.adaptor=DBOracle
> database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver
>
> It sounds like your jdbc driver tries to connect to the wrong
> server or port because it specifically mentions
> your network adaptor. If it wasn't for the fact that your
> non-jdbc connections do work I'd say you had
> routing/firewall issues
>
> I'm sorry I can't be of more help but, again, I've never had any
> JDBC trouble with Oracle7 or 8 before.
>
> Age
>
>
> > Hi again
> >
> > > What are the exact problems you are having ?
> >
> > we ran another bunch of tests and the problem is that the
> jdbc-driver throws
> > an
> > "error: network adapter could not establish a connection to the
> > <myOracleServer>"
> > This error even occurs with the most simple oracle/jdbc samples
> bundled with
> > the oracle db. We also downloaded the latest driver from the
> oracle site and
> > searched the forums there. what we found is that a lot of
> people ran into a
> > similar problem - but nobody seems to have found a solution yet.
> >
> > what i tried till now is:
> > - connecting to the database with oracle tools like studio works.
> > - the service listener is up and running
> > - we changed the connection pooling from shared to dedicated (hint from
> > oracle forum)
> > - db-ping is ok
> > - i also tried different versions of jdk and the oracle driver, but the
> > problem persists
> >
> > i know this problem is a little bit off topic here, but if anybody has
> > experienced and solved this problem any hint would be appreciated.
> >
> > greetings with a burning head,
> > stefan
> >
> > >
> > > I have run different Turbine apps on JDK 1.3.0 and 1.3.1 using
> > > the Oracle 8.1.7 and 8.1.6 JDBC drivers to
> > > connect to Oracle 8.1.7/8.1.6/8.0.5 without any problems for the
> > > last 6 months (win2k/nt4/linux). I would say
> > > the JDK-driver combination is definitely not the problem.
> > at least there is some hope :-)
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to