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've encounter this in EJB project, but probably problem of another project-types as well. This might be consequence of "turning off" the need of DD at particular places (not true for earproject). But was there probably even before (cf. 77626). So I would suggest to regenerate template DD in <EjbJarImplementation|and_similar>.getDeploymentDescriptor() implementations when we found that (e.g. for EJB) the (getVersion() < 3.0 and dd == null). Do the steps described in the 77626 and try to create new Session Bean -> wizard fails. Attaching exception.
Created attachment 33273 [details] NPE
Note that this is a little different case than those issue with JavaEE 5.0 module without DD (which is correct). This is the case when there is no (mandatory) DD for J2EE 1.4 (e.g. the user deletes it).
I do not know the history but it seems to me that there are currently two kind of code chunks which are little controversial. - One depends on the existence of deployment descriptor and if it is not (for J2EE 1.4) there it will fail with NPE and similar if DD (). (bug) - Others do not depends on the existence of DD and if it is not there, but is needed, it will emit some kind of warning dialog or refuse to continue. So either we should be less pedantic and regenerate DD if it is appropriate (see the attached pseudo-patch) and then adjust those places which emits warning dialog only so that they also regenerates DD (to stay consistent on all places). I would vote for this. Or do not regenerate DD if the user deleted it and always emit warning dialog only, and sure, prevents those NPEs and similar. So it would be up to the user to correct situation. (seems to me that this was preferred until know). If somebody knows some historical reason (e.g. HIE studies) for some of the scenarious, drop a note here, thanks. TM -> 5.5 (NPE has to be eliminated in either case) CCinig Andrei -> ejbjarproject is the main player here
Created attachment 33355 [details] 83464-pseudo-patch.diff
Andrei, please consider this one.
I'm not sure this is still relevant but feel free to reopen if you think it is. Thanks.