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.
I have created an EJB module on glassfish app server. Then i've created entity bean from db and as part of it also persistence unit. I have chosen a few tables from jdbc/sample db. When all is finished edit persistence.xml file. There is checkbox called 'Include All Entity Classe In ...'. This checkbox is checked and if i understand its functionality well all entity classes what i selected before will included. Ok. Also there is a list where i am able to add other entity classes manually. And there is problem. In this list ther are all classes what i selected before included. And i ask -> Is it necessarily to include these classes in this list when the checkbox is checked ? I think that NO. This problem is actual for some servers like a jboss (in severals configurations) and also for oracle 10g. When i deploy this EJB module with generated persistence.xml file with checked 'Include all..' checkob and classes included in list the deployment failed. When i remove all classes from the list everything is OK and persistence unit is registered successfully.
Let me first try to clarify the purpose of the 'include all entity classes in module' check box. It is sort of a reverse 'exclude-include-classes' element of the persistence.xml schema. When the check box is checked, the persistence unit will include all entities that are discovered at deployment time. Now if you uncheck the check box and add an entity to the list, all other than the listed entity will not be included. So if I understood this correctly, the problem occurs when you have that check box checked, and then also such an entity in the 'include entity classes' list that would discovered even without specifying it in the list, right (so that it kind of gets defined twice now)?
Could you please confirm whether my previous comment describes the problem accurately? Thanks.
So there are two issues here, one is that the generated entities are automatically added as managed classes toa persistence unit even when they shouldn't be, e.g. in a EJB 3 module, where entities are by auto-discovered by default. This should be fixed when issue 93101 is resolved. The other issue, the list of entity classes being enabled even when the inlclude all check box is checked, should be fixed in the persistence.xml editor.
This issue depends on 93274, not 93101.
Now that issue 92374 has been fixed, IMO the remaining issue (see desc4) is rather a P3 than a P2.
Fixed in trunk. Checking in PersistenceUnitPanel.form; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.form,v <-- PersistenceUnitPanel.form new revision: 1.3; previous revision: 1.2 done Checking in PersistenceUnitPanel.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.java,v <-- PersistenceUnitPanel.java new revision: 1.11; previous revision: 1.10 done