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 79287 - JSF from Entity does not show entities
Summary: JSF from Entity does not show entities
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 23:20 UTC by Rochelle Raccah
Modified: 2006-09-16 20:15 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rochelle Raccah 2006-06-27 23:20:52 UTC
New user dir
Create a Web App project
   Manage Servers: register GF
   Java EE 5
   JSF
Use Entities from DB wizard on derby sample db but don't create a PU
Open this wizard - warning about no PU is shown, but there are no Entities shown.

Pavel mentioned that there might be an issue filed for this the first time it is
opened, but opening it a second time works.  I don't know if that issue is filed
(issue number?), but it doesn't work for me opening it the second time either. 
I didn't open it quickly or during scanning.
Comment 1 Andrei Badea 2006-06-28 10:34:00 UTC
This is mine I think. Since the removal of PersistenceSupport in j2ee/metadata
the wizard only displays entity classes from persistence units (if any), it
doesn't look at the entity classes defined in annotations.

Easy fix, but is there a point in fixing it, considering that the wizard
requires a persistence unit anyway? What about just refreshing the Available
Classes list when a persistence unit is created?
Comment 2 Andrei Badea 2006-06-28 10:42:44 UTC
Please reassign to me after evaluation.
Comment 3 Petr Jiricka 2006-09-06 18:34:39 UTC
Since the JSP from Entity wizard requires a persistence unit, displays a clear
error and does not allow the user to continue, and after cancelling and creating
a persistence unit everything works fine, I'd say this is a very minor problem.
Changing priority to P5.
Comment 4 Andrei Badea 2006-09-07 12:46:18 UTC
I don't consider this a problem at all. Why should we display entity classes if
there is no persistence unit and the user hasn't pressed the Create Persistence
Unit button?

I will close this issue unless someone strongly disagrees.
Comment 5 Rochelle Raccah 2006-09-08 00:37:59 UTC
I still have a problem here, because even after hitting the create persistence
unit button, no entities appear.  So, the proposed solution (comments from
Andrei June 28) of refreshing would solve it, but closing this bug without that
is not a good solution, IMO.  Otherwise, why do we have a button to create the
PU here at all?  After I click it, I can't finish the wizard since there are no
entities, and if I cancel the wizard, that means I didn't create the PU anyway.

I still think this is a P3 - functionality of the wizard is not working.
Comment 6 Andrei Badea 2006-09-08 10:46:37 UTC
If the entity list is not refreshed after pressing the Create PU button, then
that is a bug and should be fixed. This issue would be just a workaround.

Erno will fix the refresh after pressing Create PU as part of the effort to
avoid creating any artefacts in the wizards before the user presses Finish. When
that is done I would close this issue. Agreed?
Comment 7 Erno Mononen 2006-09-08 14:55:43 UTC
Fixed the issue described by Andrei above.

Checking in ide/golden/friend-packages.txt;
/cvs/ide/golden/friend-packages.txt,v  <--  friend-packages.txt
new revision: 1.15.4.1.2.133; previous revision: 1.15.4.1.2.132
done
Checking in j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/
PersistenceClientEntitySelectionVisual.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/Attic/
PersistenceClientEntitySelectionVisual.java,v  <--  
PersistenceClientEntitySelectionVisual.java
new revision: 1.1.2.18; previous revision: 1.1.2.17
done
Checking in j2ee/persistence/nbproject/project.xml;
/cvs/j2ee/persistence/nbproject/Attic/project.xml,v  <--  project.xml
new revision: 1.1.2.16.2.16; previous revision: 1.1.2.16.2.15
done 
Comment 8 Erno Mononen 2006-09-08 15:12:12 UTC
Actually, only the commit log for PersistenceClientEntitySelectionVisual.java 
is relevant to this issue, the changes in friend-packages and project.xml 
merely fix a class not found problem introduced earlier by my fix for issue 
81759.
Comment 9 Rochelle Raccah 2006-09-08 22:00:01 UTC
Can you please clarify whether you expect this is fixed or not?  I can still
reproduce it.
Comment 10 Erno Mononen 2006-09-11 09:09:58 UTC
Yes, I expect that after creating a PU the entities are shown and it does work 
for me. Can you reproduce it with the given steps?
Comment 11 Rochelle Raccah 2006-09-12 00:50:29 UTC
Yes, I just reproduced it again with a build from today.
Comment 12 Rochelle Raccah 2006-09-12 00:51:28 UTC
Raising priority back to P3 since the user is stuck in the wizard.
Comment 13 Erno Mononen 2006-09-12 10:58:36 UTC
Could it be that you don't see the entities because of issue 79292? I will 
still test this, but so far it has worked consistently for me.
Comment 14 Rochelle Raccah 2006-09-13 00:46:36 UTC
I don't think it's the same, but I can't really be sure because the PU is really
only in memory until the wizard is finished and the finish button is disabled =).
Comment 15 Andrei Badea 2006-09-13 10:31:02 UTC
I can also reproduce it (no entities after Create PU). Seems caused at least by
a race condition in NNMDRListener. Should call latch.countUp() before
nnMDRListenerRP.post(), not inside the task. But the fix should be done in issue
79292.
Comment 16 Rochelle Raccah 2006-09-15 23:09:06 UTC
This is working for me now on release55 branch - probably due to fix for issue
79292.  Since that fix went in the fcs branch, I think this issue can probably
be marked fixed for 5.5 as well.
Comment 17 Andrei Badea 2006-09-16 20:15:39 UTC
Closing then, thank you for verifying it.