Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 195818 - Waiting for 30s timeout creating entity which then fails
Waiting for 30s timeout creating entity which then fails
Product: guibuilder
Classification: Unclassified
Component: Binding
PC Linux
: P2 (vote)
: 7.0
Assigned To: issues@guibuilder
: 195815 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-02-22 15:54 UTC by asenk
Modified: 2011-03-17 09:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT

Thread dump (16.68 KB, text/plain)
2011-02-22 15:54 UTC, asenk
Profiler Snapshot (42.28 KB, application/octet-stream)
2011-02-28 14:47 UTC, asenk

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-02-22 15:54:52 UTC
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'

   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) 

thread dump in attachment.
Comment 1 Tomas Pavek 2011-02-23 16:47:00 UTC
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
Comment 2 Marian Mirilovic 2011-02-28 08:30:31 UTC
Adam, please try to reproduce and attach the thread-dump. Thanks in advance.
Comment 3 asenk 2011-02-28 09:08:10 UTC
Sorry, no deadlock when I try to reproduce it. But the IDE freeze and absolutely  doesn't response for a cca. 20 seconds.
Comment 4 Marian Mirilovic 2011-02-28 14:13:54 UTC
(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)?
Comment 5 asenk 2011-02-28 14:47:15 UTC
Created attachment 106553 [details]
Profiler Snapshot

Snapshot from Profile Me feature in attachment.
Comment 6 Marian Mirilovic 2011-02-28 16:15:09 UTC
(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)
Comment 7 Antonin Nebuzelsky 2011-03-11 15:03:03 UTC
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(
at org.netbeans.modules.form.j2ee.DBTableDrop.componentAdded(
at org.netbeans.modules.form.HandleLayer$NewComponentDropListener.drop(
at java.awt.dnd.DropTarget.drop(

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(

The real problem is that EntitiesFromDBGenerator.generate() in j2ee.persistence seems to be unable to create the entities.

Reassigning to j2ee/persistence for evaluation.
Comment 8 Sergey Petrov 2011-03-11 16:06:27 UTC
I'm debugging now, and I'm able to reproduce the issue, but breakpoint at first line of EntitiesFromDBGenerator.generate() is never reached.
Comment 9 Sergey Petrov 2011-03-11 16:07:25 UTC
it may be a problem with my debug session.
Comment 10 Sergey Petrov 2011-03-11 17:04:59 UTC
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.
Comment 11 Sergey Petrov 2011-03-14 15:00:55 UTC
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.
Comment 12 Sergey Petrov 2011-03-14 15:29:55 UTC
fqn: org.netbeans.modules.form.j2ee.wizard.MasterDetailWizard
Comment 13 Antonin Nebuzelsky 2011-03-14 15:47:46 UTC
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.
Comment 14 Antonin Nebuzelsky 2011-03-14 15:49:15 UTC
*** Bug 195815 has been marked as a duplicate of this bug. ***
Comment 15 Antonin Nebuzelsky 2011-03-15 18:03:23 UTC
Comment 16 Antonin Nebuzelsky 2011-03-15 18:03:51 UTC
Tomasi, please review.
Comment 17 Tomas Pavek 2011-03-15 18:24:23 UTC
OK with me. Adjusting fix of bug #141509, which is maybe not needed anymore.
Comment 18 asenk 2011-03-16 11:58:42 UTC
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)

Comment 19 Antonin Nebuzelsky 2011-03-16 12:17:05 UTC
Fixed in 7.0
Comment 20 asenk 2011-03-16 12:51:35 UTC
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)

Comment 21 Quality Engineering 2011-03-17 09:55:23 UTC
Integrated into 'main-golden', will be available in build *201103170400* on (upload may still be in progress)
User: Antonin Nebuzelsky <>
Log: #195818 - Waiting for 30s timeout creating entity which then fails.

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