In the process of trying to build an android web service using Spring under Eclipse IDE, I need to create a Dynamic Web Project using Maven. The problem I am facing is an error " Loading descriptor for project has encountered a problem. I don't know how to solve this. Any input on that?
-
Sounds like an issue parsing xml. When do you get this error? When running the code? – Jamey Apr 11 '14 at 15:21
-
when I first create the project, if I refresh.. – KawtarHB Apr 11 '14 at 18:19
-
1It is answered here: https://stackoverflow.com/questions/11774278/eclipse-loading-descriptor-takes-ages – Techflash Aug 03 '17 at 12:26
-
It is answered here: https://stackoverflow.com/questions/11774278/eclipse-loading-descriptor-takes-ages – Techflash Aug 03 '17 at 12:27
4 Answers
If you get the following exception:
Loading descriptor for project has encountered a problem. [...] Nullpointerexception
right after creating a project, then there are 2 possible causes (or at least that how it was for me, when I had this issue).
1) A web.xml file is missing in your WebContent/WEB-INF folder or was not created during project creation. (in the last window you have to check option "Generate web.xml deployment descriptor" in eclipse, otherwise eclipse won't generate that file)
If your project is already created, you can still add a web.xml file into your WEB-INF directory. Depending on your servlet version (e.g. 2.5) you have to use a different template which can be found on the net.
2) Your Eclipse does not have all the necessary plugins for Dynamic Web projects.
You need to go to Help >> Install new Software
Select the site which corresponds to your eclipse version. (e.g. Kepler - http://download.eclipse.org/releases/kepler )
Install:
- JST Server UI
- JST Web UI
- JST Server Adapters
- JST Server Adapters Extension
- WST Server Adapters.
You may also need:
- Eclipse Java EE Developer tools
- Eclipse Java Web Developer tools
- Java Server Faces tools or JSF tools
- Eclipse faceted Project Framework
- Eclipse faceted Project Framework JDT Enablement
-
missing web.xml doesn't give this descriptor error. its just missing plugin/facets, please check your references. – aish Jan 19 '15 at 07:54
-
1@aishu I listed that problem as one possible cause for that error. As the OP has stated: that error occured during creating a new project which could be either because the OP unchecked the auto-generation or did not have all necessary plugins for dynamic web projects – DuKes0mE Jan 22 '15 at 22:03
-
Thanks for the detailed answer. "Eclipse Java Web Developer tools" should be enough to get rid of that error. – amertkara Jun 04 '15 at 17:52
- install Java EE web developer tools from Help >> "Install new Software".
- check in project properties "Project Facets" should have proper check boxes enabled eg Dynamic Web Project etc.

- 2,929
- 1
- 16
- 10
I know this is late but may be useful for others. In web.xml there may be some attribute repated in web-app tag. In my case xmlns="http://java.sun.com/xml/ns/javaee" attribute in repeated in tag web-app.

- 323
- 2
- 9
Install Eclipse Java Development tools from Help >> "Install new Software".

- 27,520
- 68
- 161
- 264