Stubbisms – Tony’s Weblog

November 26, 2007

Deployment descriptor of the module yourAppplication.war cannot be loaded

Filed under: Eclipse, Java — Tags: , , , , , — Antony Stubbs @ 6:10 pm

I’ve hit this very annoying Eclipse error several times in the past and usually fluked my way through fixing it and never bothered recording how it was fixed (if I even knew).

“The deployment descriptor of the module yourAppplication.war cannot be loaded”

I remember my colleague once Googled the answer and it was something to do with removing a file, or an entry in a file inside the workspace plugins directory.

Well my EAR project got the error again today after migrating my WAR project to a new workspace manually via file system copying. My Google-Fu must be rusty today because it looked to me like no one had the problem.
On a hunch, I created a new EAR project and added my war to it – worked no problem. Led me to think that it’s the old EAR project’s metadata. So I deleted the project through Eclipse (incl files on disk) and re-imported it from our code repository.
Lo and be-hold Eclipse sorted itself out.

If anyone actually knows the file or entries that have to be reset in the workspace metadata please post.

Advertisements

19 Comments »

  1. Evening Tony!

    I can promise you’re not the only one that’s encountered this, I’ve suffered it on at least two occasions with RAD 7. A fresh workspace and import from cvs seemed to do the trick for me, but its hardly elegant. Let me know if you find a better solution.

    Comment by Chris M — November 27, 2007 @ 12:28 pm

  2. very interesting, but I don’t agree with you
    Idetrorce

    Comment by Idetrorce — December 16, 2007 @ 2:38 am

  3. Idetrorce:
    Hi there! Care to, er, elaborate? What is it you don’t agree with? Do you have an alternative method for fixing this problem?

    Comment by Antony Stubbs — December 16, 2007 @ 11:13 am

  4. Thanks for the suggestion. I am still experiencing the problem after re-creating the war project from CVS. Maybe I need to do the same for the web.

    Comment by malcolm davis — January 16, 2008 @ 7:26 am

  5. Sounds crazy, but I removed the CR and other spaces in MANIFEST.MF file as suggested by http://tinyurl.com/339vyk and everything works.

    Weird. This shouldn’t occur. I’m a little upset with someone somewhere.

    Comment by malcolm davis — January 16, 2008 @ 7:40 am

  6. What is the “CR”?

    Comment by Chinwe — January 18, 2008 @ 10:48 am

  7. As the link mentions, “CR” is “Carriage Return”. Basically, remove all whitespace from that file.

    Comment by Bob H. — February 7, 2008 @ 10:01 am

  8. That said, the whitespace thing did not fix the problem for me. However, as suggested by another developerWorks page, I was able to fix it by:
    1) Close the project (Right-click the project, Close Project)
    2) Open the project (Right-click, Open Project)
    3) Force a full rebuild

    And, no, skipping straight to #3 didn’t fix the problem for me. But, these three steps did.

    HTH.

    Comment by Bob H. — February 7, 2008 @ 10:15 am

  9. Since so many people come to this page from Google, I thought I would add this snippit that was posted to the IBM developer works forum thread by wjm on the same topic – hope he doesn’t mind. Please note, I haven’t actually tried this.
    (http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=192063)

    I had the same problem, and resolved it by opening the .settings folder of the EAR project and editing the org.eclipse.wst.common.component file. The war module listed in the error message is missing as a dependent module, so I added it:

    <dependent-module deploy-path="/" handle="module:/resource/<Project Name>/<Project Name>">
    <dependent-object>WebModule_<number></dependent-object>
    <dependency-type>uses</dependency-type>
    </dependent-module>

    where
    <number> is the generated WebModule value from META-INF/.modulemaps file for the war
    <Project Name> is the name of the war project in the workspace

    Cheers

    If it’s mangled, double check with original url
    (http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=192063)

    Comment by Antony Stubbs — May 20, 2008 @ 11:55 am

  10. I am facing the same problem with my RAD 7. I had a web application in my eclipse and imported it into RAD 7. The Enterprise Application was not accepting the web module and none of the above solutions worked for me.

    If you have the same problem as mine, you can simply fix this by correcting your facets. Right click on your web project -> Properties -> Project Facets. You must have these facets:

    – Dynamic Web Module
    – Java
    – Websphere Web (Con-existence)
    – Websphere Web (Extended)

    In addition, in your Build Path -> Libraries you should have these entries:

    – EAR Libraries
    – JRE System Library [IBM JDK]
    – Web App Libraries
    – Websphere Application Server [your-ver]

    HTH
    Alireza Sami

    Comment by sami2box — June 11, 2008 @ 5:21 am

  11. That snippet from the IBM developer works site. helpes. Thanks for posting it.

    Comment by ktjrdn — October 31, 2008 @ 4:10 am

  12. Facing the same problem, I followed the guidance posted by Antony Stubbs in comment #9. However, my org.eclipse.wst.common.component already contained a element for my war project.

    Next, I looked for the META-INF/.modulemaps file mentioned by Antony. I didn’t find it, but I noticed that META-INF/application.xml contained two element for my war project: one with an id that matched the in org.eclipse.wst.common.component and one with a different id.

    I deleted the non-matching element from META-INF/application.xml, saved the file, and watched the error message disappear from the Eclipse’s Problems list.

    Comment by Joel Shprentz — December 2, 2008 @ 4:57 am

  13. Trying again with the greater- and lesser-than characters escaped:

    Facing the same problem, I followed the guidance posted by Antony Stubbs in comment #9. However, my org.eclipse.wst.common.component already contained a gt; element for my war project.

    Next, I looked for the META-INF/.modulemaps file mentioned by Antony. I didn’t find it, but I noticed that META-INF/application.xml contained two gt; element for my war project: one with an id that matched the gt; in org.eclipse.wst.common.component and one with a different id.

    I deleted the non-matching gt; element from META-INF/application.xml, saved the file, and watched the error message disappear from the Eclipse’s Problems list.

    Comment by Joel Shprentz — December 2, 2008 @ 5:08 am

  14. I, for one, would welcome a comment preview feature. Third try:

    Facing the same problem, I followed the guidance posted by Antony Stubbs in comment #9. However, my org.eclipse.wst.common.component already contained a <dependent-module> element for my war project.

    Next, I looked for the META-INF/.modulemaps file mentioned by Antony. I didn’t find it, but I noticed that META-INF/application.xml contained two <module> element for my war project: one with an id that matched the <dependent-module> in org.eclipse.wst.common.component and one with a different id.

    I deleted the non-matching <module> element from META-INF/application.xml, saved the file, and watched the error message disappear from the Eclipse’s Problems list.

    Comment by Joel Shprentz — December 2, 2008 @ 5:09 am

  15. We had the same issue and this is what worked. I got this from the Comment No.9 here, but it took me a while to figure it out. Thanks.

    The Web Module id defined in the META-INF/application.xml has a number appended to it.

    app.war
    appname

    That number should be the same as the one in org.eclipse.wst.common.component under .settings folder.

    <dependent-module deploy-path=”/” handle=”module:/resource//”>
    WebModule_1139431807519

    Try this.Worked for us.

    Comment by sreejithramesh — February 10, 2009 @ 10:46 am

  16. Tried all of the above and all failed. This is what worked for me: http://www-01.ibm.com/support/docview.wss?uid=swg21297984 It involved removing and readding the entry in the Module table in the application.xml.

    Comment by prblmslvr8 — July 28, 2009 @ 3:34 am

  17. Solution on post #16 works for me. Thanks.

    Comment by mtfnmtfn — June 22, 2011 @ 5:51 pm

  18. None of this worked for me. I needed to empty my web.xml, save, paste my config back in and save.

    Comment by Adam Lindell (@adamblindell) — August 8, 2011 @ 12:32 pm

  19. #16 works for me, and it really make sense…

    Comment by kamiloklauss (@kamiloklauss) — October 9, 2011 @ 11:14 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: