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!

Connecting to SQL server hangs forever.

user10878887Feb 17 2013 — edited Oct 15 2014
When I execute this line
Connection conn = DriverManager.getConnection(url, user, password);
in java 1.7.013 the application hangs forever if the username, password or database name are incorrect.

If the username, password or database name are correct then the connection works fine.
There should be a message in the first case(wrong password...).
I tested this for com.mysql.jdbc.Driver and org.postgresql.Driver.

Regards,
Victor S.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2013
Added on Feb 17 2013
10 comments
830 views