eclipse 3.3 and WAR file imports

eclipse 3.3.1.1 has an annoying bug. Try to import a WAR file that contains class files in WEB-INF/classes. Thes class files are not imported into the right folder in the imported project structure.

Importing a WAR file gets you a special folder ImportedClasses which is supposed to contain the package/folder structure for imported classes. Due to a bug in the eclipse WAR importer they are copied to ImportedClasses/WEB-INF/classes. As a result, starting a deployed web application presents plenty of ClassNotFoundExceptions and the like.

ImportedClasses folder

Today I tried this again with eclipse 3.4-M4 and was glad to see this bug fixed, I was already preparing to file a bug. Until 3.4 is released the classes must be moved manually to the right folder!

2 Comments

  • Thomas Einwaller - 2008/02/12

    Interesting bug, but when do you need to import a war file? I thought about it and the only situation this might be useful is when you start with something like an example or stub WEB application?

    Reply
  • Martin - 2008/03/05

    Absolutely right. I’m working a lot with JSF. Many component frameworks provide a complete demo of their component sets as WAR file.

    Reply

Leave a Reply

green red blue grey