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.
Product Version: NetBeans IDE Dev (Build 200803171203) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.2 running on i386; MacRoman; en_US (nb) -create web project (java EE 5) -create persistence unit -create entity classes from sample database -try to create JSF from entity classes -ERROR: list of entity classes in the wizard is empty -test project is attached
Created attachment 58674 [details] test project
With my own build 080318 everything works as desired. I used sample and vir databases. Problem is in absence of persistence library in Tomcat, so all entity classes are uncompillable and thats clear the reason, why JSF Pages from entity classes doesn't "see" them. If you change server to Glassfish v2, all is ok - project compillable and classes visible in wizard. If you made some class uncompillable - it no longer can be used for generating jsf. So this issue is about missing persistence library in Tomcat 6.0, not about incorrect behavior of wizard. Marking as invalid.
Sometimes I see the delay if my IDE is loading other big project, the list shown ~20-30 sec. later. I believe the slow network may affect as well. By eventually the list shown.
I can still reproduce the issue even if I add toplink to the project classpath. I've used a fresh IDE with clean userdir, ant Tomcat 6.0 as a server.
Note: I am not familiar with our requirements for Tomcat support. Marking target milestone as 6.1 for now, so the issue will not be considered unevaluated.
Please clarify the Tomcat requirements for the release, if possible.
list of supported servers is here: http://wiki.netbeans.org/DatabasesAndApplicationServers
lowering priority because the issue is reproducible only with Tomcat
Tried it with continuous build (Build 20080320063641) and just can't reproduce it. I tried both JPA and Hibernate, but when as toplink library is added and hence errors resolved, wizard see all entity classes. Matthew, are you able to reproduce it?
I can reproduce the problem, sort of. From what I can tell, it has nothing to do with Tomcat or Glassfish--the behavior occurs with either appserver. As soon as the progress bar associated with generating the entity classes disappears, right-click (it's faster) the project and quickly choose JSF Pages from Entity Class, before the entity classes have finished compiling. The list of entities is then shown as empty. However, just cancel, or press the back button in the wizard, and then try again. Since the entity classes have now finished compiling, they show up. I have to play the IDE a little like a video game to make this happen. If this is the actual problem, I do not think there is anything to be done, and we would just close the issue.
Just marking incomplete, to get confirmation from jhorvath that the problem is as I have diagnosed.
I've just reproduced it on another MacOSX machine. I wait after the entity classes are compiled, then invoke the wizard. 100% reproducible for me.
Then you must be doing something we are not attempting, because I cannot otherwise reproduce it on glassfish or tomcat. If possible, please provide *very* detailed steps explaining exactly how to reproduce the issue. (Or, if the resulting files would not be too big, maybe we can make screen capture videos for this sort of thing?) By the way, you mentioned it is only on Tomcat. Is it also only on Mac? dkolar, have you tried it on Tomcat+Mac?
Matthew did you already tried the steps above on the MacOSX?
No, I rarely have to seek out a Mac like this. But apparently this is one of those cases. So it is Tomcat+Mac only for you, then? Does this happen for you on Tomcat+XP?
I just came across something very like the problem on XP. When you run the Entities from DB wizard, try making sure the checkbox for generating named queries is selected. Once that is done, do you see an error message in the entities to the effect of "named queries can only be used on an entity class"--implying that the class is no longer recognized as an entity class? I did see this, in which case the list of entity classes in the JSF CRUD wizard was empty. The workaround was to go into each entity class and modify the class by adding a space somewhere and saving the file, modifying and saving like this several times if necessary, until the class was again recognized as an entity class. Is this consistent with what you are seeing?
Looks like some problem with the model, reassigning to Andrei
The issue really seems to be that the persistence unit wizard did not add the persistence provider to the classpath. Fixed, and also added a message to the JSF wizard warning the user that a persistence provider needs to be on the classpath. A nicer fix could have been to just temporarily add the persistence provider to the classpath of the entity class model, but that would be too risky so late in the release cycle. Fixed in c3537ed61a0e.