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 56952 - DDFilesListener listens on invalid DD paths
Summary: DDFilesListener listens on invalid DD paths
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-24 17:29 UTC by Andrei Badea
Modified: 2006-03-24 12:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Re-ordered for getSourceRoots returning docbase on top (1.11 KB, patch)
2005-04-01 16:37 UTC, Nam Nguyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2005-03-24 17:29:45 UTC
When I create an EJB module, DDFilesListener starts to listen on these
deployment descriptors:

- <project_root>/src/java/ejb-jar.xml, 
- <project_root>/src/java/webservices.xml

There are no deployment descriptors in /src/java, so obviously there is
something wrong.

The discussion of this issue started in issue #55779. Pavel suggests that we
should search the DDs in all the source roots.
Comment 1 Nam Nguyen 2005-03-24 20:12:08 UTC
Andrei, DDListener is similar to configurationfilelistenter in that some DD
files might not exist at the creation of the project.  We have the similar
approach to listen on the top level or the configuration root which happen to
also contain DD files.  J2eeserver relies on devmodule implementation to tell
where is the root direcoty of DD files.  This dependency is base on this contract:
J2eeModuleProvider.getSourceRoots() return list should have config root as first
in the list.  This listener has works for a while.  I suspect that some change
in ejbjarproject implementation of J2eeMOduleProvider that return
projectdir/java/src as first element in the list (which break the contract and
cause this listening on the wrong root).

I don't think we should listen to all source roots.  We either leave the
contract as is (fix ejbjarproject implementation of getSourceRoots and the
javadoc to make it clearer, esp. the example list).  Or, we could remove this
contract and add new API e.g. J2eeModuleProvider.getDeploymentDescriptorDirectory.
Comment 2 Pavel Buzek 2005-04-01 14:59:41 UTC
I will do a hotfix as Nam suggested.
Comment 3 Nam Nguyen 2005-04-01 16:33:45 UTC
Web project also need a similar fix.  Following is the patch.
Comment 4 Nam Nguyen 2005-04-01 16:37:37 UTC
Created attachment 21301 [details]
Re-ordered for getSourceRoots returning docbase on top
Comment 5 Pavel Buzek 2005-04-02 22:48:15 UTC
Nam, thanks. Fixed in ejb and web module project:

Checking in src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProvider.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProvider.java,v
 <--  EjbJarProvider.java
new revision: 1.23; previous revision: 1.22

Checking in src/org/netbeans/modules/web/project/ProjectWebModule.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ProjectWebModule.java,v 
<--  ProjectWebModule.java
new revision: 1.38; previous revision: 1.37
Comment 6 zikmund 2005-07-13 16:10:58 UTC
v