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 83464 - Regenerate Deployment Descritpor when it is appropriate
Summary: Regenerate Deployment Descritpor when it is appropriate
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-25 12:07 UTC by Martin Krauskopf
Modified: 2008-11-18 21:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (8.64 KB, text/plain)
2006-08-25 12:07 UTC, Martin Krauskopf
Details
83464-pseudo-patch.diff (1.11 KB, text/plain)
2006-08-29 11:31 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2006-08-25 12:07:08 UTC
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.
Comment 1 Martin Krauskopf 2006-08-25 12:07:52 UTC
Created attachment 33273 [details]
NPE
Comment 2 Martin Krauskopf 2006-08-25 13:37:01 UTC
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).
Comment 3 Martin Krauskopf 2006-08-29 11:30:38 UTC
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
Comment 4 Martin Krauskopf 2006-08-29 11:31:28 UTC
Created attachment 33355 [details]
83464-pseudo-patch.diff
Comment 5 Martin Krauskopf 2006-09-11 16:38:25 UTC
Andrei, please consider this one.
Comment 6 David Konecny 2008-11-18 21:35:42 UTC
I'm not sure this is still relevant but feel free to reopen if you think it is. Thanks.