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 71363 - Exception is thrown if prj contains no src roots
Summary: Exception is thrown if prj contains no src roots
Status: VERIFIED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: EJB Freeform (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-13 13:41 UTC by Lukas Jungmann
Modified: 2007-10-23 22:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide log (26.80 KB, text/plain)
2006-01-13 13:53 UTC, Lukas Jungmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-01-13 13:41:38 UTC
[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)
Comment 1 Lukas Jungmann 2006-01-13 13:50:46 UTC
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)
Comment 2 Lukas Jungmann 2006-01-13 13:53:12 UTC
Created attachment 28385 [details]
ide log
Comment 3 Milan Kubec 2006-06-13 10:41:25 UTC
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.
Comment 5 Petr Jiricka 2006-08-25 14:31:59 UTC
To me this does not look like a common scenario - an EJB project without sources
makes no sense. Should this be a P4?
Comment 6 Milan Kubec 2006-08-25 14:42:08 UTC
I was thinking about lowering priority too.
Comment 7 Andrei Badea 2006-09-06 11:47:01 UTC
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.
Comment 8 Andrei Badea 2007-07-04 09:59:33 UTC
The EJB freeform project has been dropped from NetBeans 6.0.
Comment 9 Lukas Jungmann 2007-10-23 22:58:33 UTC
v.