Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cannot contact database via JDBC thin driver but I can contact it via OCI driver
Cristian-Marius Vulpe wrote:
> Hi!
>
> I have an Oracle 9.2.0 running on Solaris OS. I am trying to use a
> JDBC application to contact the database, but I have the following:
> - if I set the application to use the OCI driver (on the machine
> where the Oracle is running) everything if fine.
> - [the problem] if I try to use the thin driver (even if I start the
> application on the same machine as the Oracle installation), I cannot
> contact the database and I receive the following exception:
Hi. If you can show the tnsnames.ora entry for the instance you want to reach,
and show us the URL and arguments you send to the driver, we might see an
error there. ALso, do you send the same user/password to the driver as you do
SQL-PLUS?
Joe Weinstein at BEA
>
> java.sql.SQLException: Io exception: Connection
> refused(DESCRIPTION=(TMP=)(VSNNUM=153093120)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
>
> at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3695)
>
> at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:352)
>
> at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:362)
>
> at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:536)
>
> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:328)
>
> at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:124)
>
> at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
>
> at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:368)
>
> at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
>
> at java.lang.Thread.run(Thread.java:534)
>
> Please notice that there is no firewall (this is valid for the remote
> machines only), the TNS listener runs on 1521 port and I have the
> following lines in "sqlnet.ora" file from "network/admin/" folder:
>
> # allow only specified nodes to access the database(s)
> TCP.VALIDNODE_CHECKING = YES
> TCP.INVITED_NODES = (<os_DNS_Name>, <my_IP_address>).
>
> Do you think you can help me with this topic (?) or please point me to
> a documentation where I can find this topic.
>
> Many thanks,
> cristi.
>
> PS: sorry if this is (maybe) the wrong place to put this question!
Received on Mon Oct 11 2004 - 10:58:37 CDT