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.
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.
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.
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?
Created attachment 20830 [details] thread dump
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.
I'll investigate and maybe will delegate :-)
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 ***
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.
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.
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).
Petr, so, whose fault is it and how should it be fixed?
I would prefer someone in Prague :-) Let me know...
Please, find a better victim than me to fix this one :-)
Petr, over to you...
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?
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.
Added the test: openide/src/org/openide/text/CloneableEditorSupport.java,v1.148 openide/test/unit/src/org/openide/text/Deadlock56413Test.java,v1.1