Eclipse 'loading descriptor' takes ages
Asked Answered
B

7

28

We have a Java Spring MVC based project using Eclipse (Juno - the latest build), using the latest JVM 1.7 and Tomcat 7. Eclipse is pretty fast, and everything is set to default settings. Once it is all loaded up, it is lightning fast, which makes a pleasant change.

However, the only gripe is that if I open a project, it begins 'Loading descriptor', which as far as I can tell is our 185-line web.xml file. Sometimes this might take 5 minutes to load, sometimes might just not load at all. This prevents any changes being made, as the system waits for the descriptor to load before anything else happens. Pressing the stop button on this leaves the system 'waiting' for the cancel to go through, and the only way out seems to be to kill the java process is the task manager. If it does by chance load, then the system runs fine (unless you open another project for reference, then the fun begin again).

Is there some configuration that skips the descriptor (e.g. is it something to do with validation that can be skipped) or would there be some reason that the descriptor might not load properly?

Boreal answered 2/8, 2012 at 9:5 Comment(1)
I had the same problem and I solved by switching to Package Explorer View. See the third answer: "That problem occurred because "Project Explorer" performs loading of environment descriptor. So after the eclipse was loaded, choose "Windows" -> "Open Perspective" -> "Java". It will open the "Package Explorer" instead of "Project Explorer". You need to be quick and get it done before the eclipse load the descriptor. " However I am curious to learn why Eclipse hangs when is trying to load the descriptor? Anyone could shed some light here?Roughneck
L
35

This happens when your Project Explorer is open. Uncheck unnecessary options at Project Explorer's "Customize View" dialog. On the top right corner of the Project Explorer panel there is menu called "Customize View", go to the second tab called "Content" and uncheck unwanted options...

Liederkranz answered 7/11, 2012 at 10:5 Comment(1)
I had to untick just about every little thing there, but eventually the belly ache did stop. Strange thing, this only started after an attempt at a svn update.Daedal
O
16

That problem occurred because "Project Explorer" performs loading of environment descriptor. So after the eclipse was loaded, choose "Windows" -> "Open Perspective" -> "Java". It will open the "Package Explorer" instead of "Project Explorer".

You need to be quick and get it done before the eclipse load the descriptor.

Orpha answered 11/1, 2013 at 4:12 Comment(1)
Yeah right, I had the same problem and I solved by switching to Package Explorer View.Roughneck
L
4

As you mentioned you could try disabling all 'xml' based validations like so :

  1. Start by disabling all XML / XSL based validation towards the bottom in Windows -> Preferences -> Validation :

    Eclipse General Validation

  2. Type 'Validation' in Eclipse preferences and disable any XML related validations, like so:

    Eclipse XML Specific Validation and,

    enter image description here

Might be worth to try out the following:

  1. Check your proxy settings. Are they such that if required your Eclipse would be able to connect to the internet ? The reason I ask is, with XML files Eclipse attempts to download the related schema files.
  2. Also, check Eclipse' error log view to see whether there is something specific that it's trying to do when it hangs.
  3. Do you have a source control plugin inside eclipse which is linked to the project containing the web.xml file ? If so, if you disconnect your network does it help ? Infact, I would recommend disconnecting your network connection and try opening the problematic project.
  4. If this is an old workspace from a previous version of Eclipse, try importing this project into a new workspace ?

Hope the above helps.

Leucotomy answered 2/8, 2012 at 10:21 Comment(0)
R
4

Yes, the problem is in "Project Explorer". If you like to use the "Java EE" perspective (which by default opens "Project Explorer" view) then close the "Project Explorer" view and open the "Package Explorer" view.

Rust answered 25/7, 2013 at 13:39 Comment(0)
D
2

Changed Explorer to Package Explorer Window->Show View->Other->Java->Package Explorer It works now.

Dossal answered 27/4, 2014 at 6:43 Comment(0)
M
1

In my case, renaming the web.xml to web-fail.xml stops the hanging.

At least, I replaced my 2.4 schema definition with the 3.1

`<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
     http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
     version="3.1">
`

and everything works fine again

Monde answered 2/2, 2017 at 22:30 Comment(0)
V
0

My way to succes was deleting the project from the eclipse. And removing ".classpath",".settings" and ".project" files(".settings" is a directory). After that importing project into eclipse as existing maven project.

Viperine answered 15/12, 2015 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.