This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 56413 - Unable to connect dialog when autoconnect to pb
Summary: Unable to connect dialog when autoconnect to pb
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-15 01:30 UTC by Rochelle Raccah
Modified: 2008-12-22 17:54 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (16.76 KB, text/plain)
2005-03-15 03:26 UTC, Rochelle Raccah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2005-03-15 01:30:54 UTC
In a new EJB module project, I do Create Entity from DB and choose the first in
the list of jdbc connections.  This is not yet connected, so the autoconnect to
the pb db should happen here.  I get this error dialog:
"Unable to connect to the database because:

cannot establish a connectino to jdbc:pointbase://localhost:9092/sample using
com.pointbase.jdbc.jdbcUniversalDriver (SQL-server rejected establishment of
SQL-connection.
Pointbase Server may not be running on localhost at port 9092.)

You probably entered an incorrect database URL, username, or password."

If I hit OK, it goes to the next screen and shows me the tables, though.
Comment 1 Rochelle Raccah 2005-03-15 01:35:31 UTC
My IDE appears to hang after finishing the wizard like this - add all tables,
finish.  Try to close Pointbase DB process output window, no UI response in the
IDE.  On disk, java files are there, xml files not totally updated.

Raising to P2 because of hanging.
Comment 2 _ ludo 2005-03-15 02:08:07 UTC
please, dump the threads and attach them for analysis.

Aslo, do you see the output area for the pointbase process (the same you would
see when you start manually)

Finally, when you start manually, does it work?
Comment 3 Rochelle Raccah 2005-03-15 03:26:49 UTC
Created attachment 20830 [details]
thread dump
Comment 4 Rochelle Raccah 2005-03-15 04:06:35 UTC
Okay, thread dump attached.

Yes, I see the output area as normal.

When I try manually, it starts fine, but then in the wizard, I get
NullPointerExceptions on the first pb choice. I realized that is not the one
that was started from the menu, so I clicked on the second one and get pretty
much the same error as below except a mention of 2 open databases.
Comment 5 _ ludo 2005-03-15 04:57:42 UTC
I'll investigate and maybe will delegate :-)
Comment 6 _ ludo 2005-03-16 05:32:01 UTC
more or less same deaslock than http://www.netbeans.org/issues/show_bug.cgi?id=55324
which is also a P2 bug...
So I think This is around jmi interaction, possibly srcelement bridge...

Need more JMI expertise on this one...


*** This issue has been marked as a duplicate of 55324 ***
Comment 7 Martin Matula 2005-03-16 10:30:37 UTC
This is not a duplicate. And it seems it is not related to JMI - there seems to
be a deadlock between CloneableOpenSupport$Listener and NbEditorDocument. But I
am not sure - it needs more investigation. CC'ing Mila, maybe he can help.
Comment 8 Miloslav Metelka 2005-03-16 13:50:15 UTC
The problem might be related to the fact that there is a pending reload of the
document but I don't see the culprit immediately now. Adding Petr and Yarda to
cc maybe they will get oriented in it more quickly.
Comment 9 Petr Nejedly 2005-03-16 14:55:23 UTC
There is load and reload happening at once, it seems.
The "Parsing Event Queue" got in where there was no document loaded and started
loading in the first "Default RP", but before it actually started loading,
the PCL on env recognized a change of the file and started reload from inside
the write access, just to recognize there is no document fully loaded yet, which
lead to the deadlock (waits for finished loading, which can't get through
because of held writeLock).
Comment 10 Martin Matula 2005-03-16 19:28:31 UTC
Petr, so, whose fault is it and how should it be fixed?
Comment 11 _ ludo 2005-03-16 19:48:23 UTC
I would prefer someone in Prague :-)
Let me know...
Comment 12 _ ludo 2005-03-17 03:32:44 UTC
Please, find a better victim than me to fix this one :-)
Comment 13 Jan Chalupa 2005-03-17 14:04:22 UTC
Petr, over to you...
Comment 14 Petr Nejedly 2005-03-17 15:45:32 UTC
I probably have a simple fix for the deadlock in CloneableEditorSupport, but the
code paths are still hairy. Wouldn't it be possible to prepare the source in
memory and write it to the disc once it is finished?

Comment 15 Petr Nejedly 2005-03-18 09:35:00 UTC
Should be fixed now.
openide/src/org/openide/text/CloneableEditorSupport.java,v1.146

I have no test to prove it though, please try to verify.
Comment 16 Petr Nejedly 2005-03-30 10:53:21 UTC
Added the test:
openide/src/org/openide/text/CloneableEditorSupport.java,v1.148
openide/test/unit/src/org/openide/text/Deadlock56413Test.java,v1.1