Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic Web project Error "Loading descriptor"

Tags:

eclipse

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?

like image 356
KawtarHB Avatar asked Apr 11 '14 15:04

KawtarHB


3 Answers

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.

like image 97
kunal Avatar answered Nov 18 '22 21:11

kunal


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:

  1. JST Server UI
  2. JST Web UI
  3. JST Server Adapters
  4. JST Server Adapters Extension
  5. WST Server Adapters.

You may also need:

  1. Eclipse Java EE Developer tools
  2. Eclipse Java Web Developer tools
  3. Java Server Faces tools or JSF tools
  4. Eclipse faceted Project Framework
  5. Eclipse faceted Project Framework JDT Enablement
like image 14
DuKes0mE Avatar answered Nov 18 '22 21:11

DuKes0mE


  1. install Java EE web developer tools from Help >> "Install new Software".
  2. check in project properties "Project Facets" should have proper check boxes enabled eg Dynamic Web Project etc.
like image 1
aish Avatar answered Nov 18 '22 20:11

aish