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.
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.
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.
I will do a hotfix as Nam suggested.
Web project also need a similar fix. Following is the patch.
Created attachment 21301 [details] Re-ordered for getSourceRoots returning docbase on top
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
v