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.
Created attachment 106304 [details] Thread dump Product Version: NetBeans IDE Dev (Build 201102220001) Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b02 System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_US (nb) 1. Invoke New Project wizard 2. Choose 'Java' Category - 'Java Desktop Application' Project and press 'Next >' 3. Type e.g. "MyApplication" for Project Name and choose 'Database Application' shell and press 'Next >' 4. Choose 'jdbc:derby...[[[appOnAPP | [app on APP]]' in Database Connection and change Database Table to 'PRODUCT' 5. Move all items at once from 'Colums to Include' to 'Available Columns' by pressing the ' << ' button 6. Move 'PRODUCT_ID', 'MARKUP' and 'DESCRIPTION' back to 'Colums to Include' using the ' > ' button 7. Press 'Next >' 8. Don't change any settings on the last screen and press 'Finish' AND THEN: 1. Create new JFrame Form in the 'myapplication' package 2. Insert JTable from the JTable to the form 3. Switch from Projects to Services window 4. Select the Sample Database Connection node under 'Databases' (jdbc:derby...[[[appOnAPP | [app on APP]]) 5. If its is not connected, open its popup menu and select 'Connect' 6. Expand 'Tables' and select 'CUSTOMER' 7. Drag the 'CUSTOMER' table by mouse and drop it into the JTable in designer (small chain link should appear during the dragging) IDE DEADLOCK. thread dump in attachment.
There is no deadlock in the attached thread dump, it just shows opened About window. Can you attach the real deadlock - if you are able to reproduce? Thanks
Adam, please try to reproduce and attach the thread-dump. Thanks in advance.
Sorry, no deadlock when I try to reproduce it. But the IDE freeze and absolutely doesn't response for a cca. 20 seconds.
(In reply to comment #3) > Sorry, no deadlock when I try to reproduce it. But the IDE freeze and > absolutely doesn't response for a cca. 20 seconds. That's fine Adam, could you please use Profile Me feature and attach the log here (start before you invoke the action that takes 20s and stop right after)? http://wiki.netbeans.org/GenerateThreadDump#Profile_Me_Now
Created attachment 106553 [details] Profiler Snapshot Snapshot from Profile Me feature in attachment.
(In reply to comment #5) > Snapshot from Profile Me feature in attachment. ... so reopen (don't have NB running, so have no chance to evaluate snapshot)
Reproducible without JDK7. Removing the keyword. The EDT is stuck for 30s in java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.netbeans.modules.form.j2ee.J2EEUtils.createEntity(J2EEUtils.java:605) at org.netbeans.modules.form.j2ee.DBTableDrop.componentAdded(DBTableDrop.java:177) at org.netbeans.modules.form.HandleLayer$NewComponentDropListener.drop(HandleLayer.java:3319) at java.awt.dnd.DropTarget.drop(DropTarget.java:434) ... J2EEUtils.createEntity is repeatedly trying to find entity in model where it should appear. But that fails for some reason and after 30s waiting it continues and runs into NPE at org.netbeans.modules.form.j2ee.DBTableDrop.componentAdded(DBTableDrop.java:205). The real problem is that EntitiesFromDBGenerator.generate() in j2ee.persistence seems to be unable to create the entities. Reassigning to j2ee/persistence for evaluation.
I'm debugging now, and I'm able to reproduce the issue, but breakpoint at first line of EntitiesFromDBGenerator.generate() is never reached.
it may be a problem with my debug session.
for yet unknown reason something block model refresh afer initial project creation. it's easy to reproduce by next steps: create java desktop db application, create new entity remove all entities from persistence.xml try to add entities with "Add" button to persistence xml, only initially created (during project creation) entity is listed here. to get model refreshed you have to restart the project. also with initial steps if restart after desktop project creation, drop for tables will work and model will be refreshed after each entity creation.
Please check postJavaInfrastructureCleanup functionality in MasterDetailWizard, it "cleanup" too much. I can comment it to fix the issue, but it's better if owner will check it's usage.
fqn: org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard
Thanks a lot for the evaluation! Commenting out the code in MasterDetailWizard.postJavaInfrastructureCleanup() does help for me. It also fixes other symptoms, filed as issue 195815. I will mark that one as a duplicate.
*** Bug 195815 has been marked as a duplicate of this bug. ***
http://hg.netbeans.org/core-main/rev/285442d04db2
Tomasi, please review.
OK with me. Adjusting fix of bug #141509, which is maybe not needed anymore.
Product Version: NetBeans IDE Dev (Build 201103160400) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_US (nb) Verified.
Fixed in 7.0 http://hg.netbeans.org/releases/changeset/bf7ada1c9d2d
Product Version: NetBeans IDE 7.0 RC1 (Build 201103160000) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_US (nb) Verified
Integrated into 'main-golden', will be available in build *201103170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/285442d04db2 User: Antonin Nebuzelsky <anebuzelsky@netbeans.org> Log: #195818 - Waiting for 30s timeout creating entity which then fails.