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.
[5.0rc1] -have some EJB ff project -go to project properties -> java sources and remove all source pkgs and test pkg folders and press OK => java.lang.AssertionError at org.netbeans.modules.j2ee.ejbfreeform.EJBProjectNature.createSourceFo lderView(EJBProjectNature.java:121) at org.netbeans.modules.ant.freeform.ui.View$RootChildren.createNodes(Vi ew.java:191) at org.openide.nodes.Children$Keys$KE.nodes(Children.java:2144)
Other steps which leads to similar situation, but with other kind exception: -go through the new ejb ff wizard and 5th panel (source pkg folders) remove all package folders -press Finish => java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:546) at java.util.ArrayList.get(ArrayList.java:321) at org.netbeans.modules.j2ee.ejbfreeform.EJBProjectGenerator.putEJBSourc eFolder(EJBProjectGenerator.java:92) at org.netbeans.modules.j2ee.ejbfreeform.ui.NewEJBFreeformProjectWizardI terator$1.run(NewEJBFreeformProjectWizardIterator.java:91) ... (full ide log with both exceptions is attached)
Created attachment 28385 [details] ide log
Second exception fixed: Checking in EJBProjectGenerator.java; /cvs/j2ee/ejbfreeform/src/org/netbeans/modules/j2ee/ejbfreeform/EJBProjectGenerator.java,v <-- EJBProjectGenerator.java new revision: 1.11.22.2; previous revision: 1.11.22.1 done The first one will need probably different approach than I thought. The problem is that if user removes java source root in project customizer then all java related XML fragments are removed from project.xml, except <source-folder> element with label "Enterprise Beans" which is under elements <view> - <items>. This element is generated by EjbProjectGenerator and java customizer doesn't know about it. Moreover Ejb panel is first one in the customizer so it's not possible to check the content of <view> element when customization of Ejb related settings is done. The solution might be to add listener that would check if each java source folder has coresponding ejb source folder, but that seems to be a bit messy, since the project.xml is generated per-partes thus the checking mechanism might fight with the EjbProjectGenerator.
Diff: http://www.netbeans.org/source/browse/j2ee/ejbfreeform/src/org/netbeans/modules/j2ee/ejbfreeform/EJBProjectGenerator.java?r1=1.11.22.1&r2=1.11.22.2
To me this does not look like a common scenario - an EJB project without sources makes no sense. Should this be a P4?
I was thinking about lowering priority too.
According to the bug priority guidelines a P4 is "incorrect behavior that doesn't affect functionality". Throwing exceptions doesn't match this definition. I think this issue is more than a P4.
The EJB freeform project has been dropped from NetBeans 6.0.
v.