Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 207499

Summary: Module deployment descriptor cannot be loaded
Product: [WebTools] WTP Java EE Tools Reporter: Rebecca Gong <rjgong>
Component: jst.j2eeAssignee: Jason Sholl <jsholl>
Status: RESOLVED DUPLICATE QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, htsuji, rjgong
Version: 1.5.5   
Target Milestone: 2.0.2 M202   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rebecca Gong CLA 2007-10-25 15:03:49 EDT
Build ID: M20070212-1330

Steps To Reproduce:
1. Launch a new workspace
2. Import ARInvoiceAndBilling.zip and wait until auto-build completes
3. Get error messages something like the following in Problems view:
    
The deployment descriptor of the module 'ARInvoiceAndBillingWeb.war' cannot be loaded.

I got this error when using WebSphere Integration Developer, but actually this error marker is created by Eclipse plug-in org.eclipse.wst.validation, so I am opening this Bugzilla defect. Note that this may be a timing problem, since the problem is not consistent. Should you have any problem on reproducing, please contact me (rjgong@ca.ibm.com) or Hiroshi Tsuji (htsuji@ca.ibm.com).

More information:
Here's information Hiroshi found for one error marke:
 - Problem marker info:
   -- Resource = project ARFundsDisputeApp
   -- Type = org.eclipse.jst.j2ee.EARValidatorMarker
 - Call stack for creating the marker:
     Thread [Worker-171] (Suspended (breakpoint at line 628 in Resource))       
        Project(Resource).createMarker(String) line: 628       
        TaskListUtility.addTask(String, IResource, String, String, String, int, String, String, String, int, int) line: 79       
        ValidationOperation$1$1.run(IProgressMonitor) line: 1752       
        Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1737       
        ValidationOperation$1.done(IJobChangeEvent) line: 1775       
        JobListeners$3.notify(IJobChangeListener, IJobChangeEvent) line: 39       
        JobListeners.doNotify(JobListeners$IListenerDoit, IJobChangeEvent) line: 112       
        JobListeners.done(Job, IStatus, boolean) line: 152       
        JobManager.endJob(InternalJob, IStatus, boolean) line: 540       
        WorkerPool.endJob(InternalJob, IStatus) line: 100       
        Worker.run() line: 74       
 - Variables at the top of the call stack:
   -- Resource.createMarker()
      - this = project ARFundsDisputeApp
      - type = org.eclipse.jst.j2ee.EARValidatorMarker
   -- TaskListUtility.addTask()
      - pluginId = org.eclipse.jst.j2ee.internal.validation.UIEarValidator
      - resource = project ARFundsDisputeApp
      - location = ""
      - messageId = ERROR_MODULE_DD_FILE_NOT_FOUND
      - message = The deployment descriptor of the module 'ARFundsDisputeEJB.jar' cannot be loaded.
      - markerType = 1
      - markerName = org.eclipse.jst.j2ee.EARValidatorMarker
      - targetObjectName = null
      - groupName = null
      - offset = -1
      - length = -1
      - severity = 2
      - item = null

The code looks to be trying to load META-INF/ejb-jar.xml file in the EJB project:
  Thread [Worker-187] (Suspended)       
     EJBJarFileImpl.getDeploymentDescriptorUri() line: 128       
     EJBJarFileImpl(ModuleFileImpl).getDeploymentDescriptorResource() line: 61       
     EjbJar11ImportStrategyImpl(XmlBasedImportStrategyImpl).primLoadDeploymentDescriptor() line: 39       
     EjbJar11ImportStrategyImpl.loadDeploymentDescriptor() line: 87       
     EjbJar11ImportStrategyImpl.importMetaData() line: 81       
     EJBJarFileImpl.getDeploymentDescriptor() line: 117       
     EJBJarFileImpl.getStandardDeploymentDescriptor() line: 135       
     EARFileImpl.getDeploymentDescriptor(Module) line: 333       
     EJBModuleRefImpl(ModuleRefImpl).getDeploymentDescriptor() line: 165       
     UIEarValidator(EarValidator).validateEJBModuleRefs(ModuleRef) line: 463       
     UIEarValidator(EarValidator).validateRefs() line: 399       
     UIEarValidator(EarValidator).validate() line: 122       
     UIEarValidator(EarValidator).validateInJob(IValidationContext, IReporter) line: 144       
     UIEarValidator.validateInJob(IValidationContext, IReporter) line: 220       
     ValidatorJob.run(IProgressMonitor) line: 70       
     Worker.run() line: 58       
The file exists at the time of the error.
Running validation on the App project following the build does not cause the error.
A clean build of only the App project removes the error marker.

Hiroshi also found the following written to the console (unclear if it's related to the problem):
  Opener of Archive didn't close! org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentLoadStrategyImpl@2c882c88
  java.lang.Exception
     at org.eclipse.jst.j2ee.internal.archive.operations.ComponentLoadStrategyImpl.<init>(ComponentLoadStrategyImpl.java:193)
     at org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentLoadStrategyImpl.<init>(JavaComponentLoadStrategyImpl.java:18)
     at org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities.asArchive(J2EEProjectUtilities.java:524)
     at org.eclipse.jst.j2ee.internal.archive.operations.EARComponentLoadStrategyImpl.addModulesAndUtilities(EARComponentLoadStrategyImpl.java:119)
     at org.eclipse.jst.j2ee.internal.archive.operations.EARComponentLoadStrategyImpl.getFiles(EARComponentLoadStrategyImpl.java:51)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl.collectFiles(LoadStrategyImpl.java:286)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFiles(ContainerImpl.java:237)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl.getFile(ContainerImpl.java:197)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.initModuleFileFromEAR(ModuleRefImpl.java:122)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.getModuleFile(ModuleRefImpl.java:106)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getModuleFile(EARFileImpl.java:93)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:333)
     at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl.getDeploymentDescriptor(ModuleRefImpl.java:165)
     at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateEJBModuleRefs(EarValidator.java:463)
     at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateRefs(EarValidator.java:399)
     at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validate(EarValidator.java:122)
     at org.eclipse.jst.j2ee.model.internal.validation.EarValidator.validateInJob(EarValidator.java:144)
     at org.eclipse.jst.j2ee.internal.validation.UIEarValidator.validateInJob(UIEarValidator.java:220)
     at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:70)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Comment 1 Carl Anderson CLA 2007-11-01 18:45:29 EDT
Jason, please investigate this.

Rebecca- was this opened after the recent bunch of patches on 1.5.5?  And are you looking to get another patch on top of 1.5.5?  Or will fixing this in 2.0.2 be good enough?
Comment 2 Jason Sholl CLA 2007-11-02 16:43:25 EDT
Running the same scenario with the patch from bug 206463 fixes this problem.

*** This bug has been marked as a duplicate of bug 206463 ***