Bug 120006 - Can't connect to PostgreSQL 7
Can't connect to PostgreSQL 7
Status: RESOLVED WORKSFORME
Product: db
Classification: Unclassified
Component: Code
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: Jiri Rechtacek
issues@db
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-25 11:20 UTC by serge_gray
Modified: 2009-09-17 11:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
log during session (55.91 KB, application/octet-stream)
2007-10-26 12:02 UTC, serge_gray
Details

Note You need to log in before you can comment on or make changes to this bug.
Description serge_gray 2007-10-25 11:20:32 UTC
Occurs when trying to connect to PosgreSQL database.
Following steps has made:
1. PosgreSQL server has installed on localhost and has successfully run
2. Database named "postgres" has created by mean server explorer - successfully
3. jdbc driver postgresql-8.2-506.jdbc4.jar has loaded in the database explorer - successfully
4. Trying to connect to database whith this options:
    URL=jdbc:postgresql:posgres
    user=valid name
    password=valid password
After clicking OK database explorer trying to connect. Waiting... for a long long time.
But connection is not established. There is no exeptions, no error messages. Just waiting for infinite tine.

This problem is not occures when connecting programmatically: DriverManager.getConnection()
Comment 1 Andrei Badea 2007-10-25 13:02:35 UTC
Try if turning the proxy off (Tools - Options) helps. If it doesn't, please do a full thread dump during the wait and
attach it to the issue. Thanks.
Comment 2 serge_gray 2007-10-26 06:23:40 UTC
I found that PosgreSQL jdbc driver type 3 (postgresql-8.2-506.jdbc3.jar) works correctly
But driver type 4 works incorrectly as I wrote.
How can I do a full thread dump during the wait connection?
Comment 3 Andrei Badea 2007-10-26 10:52:31 UTC
Simplest to start NetBeans from a terminal / console window and press Ctrl+\ during the wait. 

Also, please attach your messages.log file. It is located in var/log/messages log in your userdir (see
http://wiki.netbeans.org/wiki/view/FaqWhatIsUserdir).
Comment 4 serge_gray 2007-10-26 12:02:23 UTC
Created attachment 51771 [details]
log during session
Comment 5 Andrei Badea 2007-10-26 14:12:10 UTC
Seems the PostgreSQL JDBC 4 version is compiled with a 1.6 target level, but you run NetBeans on JDK 1.5. There is a
"bad version number in .class file" exception towards the end of the message log caused by this. So for JDK 1.5 you need
to use the JDBC 3 driver.

Still a valid bug for NetBeans, because it should display an error message instead of waiting indefinitely.
Comment 6 Jiri Rechtacek 2009-02-10 15:36:43 UTC
Reassigned to new owner.
Comment 7 Jiri Rechtacek 2009-09-17 11:12:58 UTC
I can connect ProgreSQL via postgresql-8.2-506.jdbc4 in recent NB IDE releases (NB6.7, NB6.8Beta)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo