Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLException: Connection refused: connect - PLEASE HELP..!!

843854Jul 6 2005 — edited Jan 8 2008
Hi,

I'm having a problem of connecting to SQL Server db. I'm using "com.inet.tds.TdsDriver" jdbc driver with SQL Server 2000 on XP with Tomcat 4.1.24.
It gives the following exception:
com.inet.tds.SQLException: Connection refused: connect

If I connect to some other m/c 's db in the network (through the ip address) its working fine only on connecting to my localhost this problem occurs.

I also tried running the indivijual ant target script where the exception points to. still the same failure occurs. The ant script is as follows:

<target name="delete-sample-and-test" depends="check_passwords, decrypt_passwords, read_passwords">
<echo>("${jdbc_driver}")</echo>
<echo>("${jdbc_url}")</echo>
<sql
driver="${jdbc_driver}"
url="${jdbc_url}"
userid="${database_admin_username}"
password="${password.admin}"
autocommit="false"
onerror="stop">
<classpath refid="classpath"/>
<transaction src="${sample_and_test_dir}/delete-test-data.sql"/>
<transaction src="${sample_and_test_dir}/delete-sample-data.sql"/>
</sql>
</target>

Please let me know why is the connection refused.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2008
Added on Jul 6 2005
29 comments
6,461 views