redhat-developer / redhat-developer/vscode-java

Invalid project description

Open
#574 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug ls-error/crash
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

When I open the first class in my SAP Hybris workspace the language server starts up and then after some time outputs the following log:

[Error - 07:25:19] 26.06.2018 07:24:41 Initialization failed 
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
java.lang.RuntimeException: org.eclipse.core.internal.resources.ResourceException: Invalid project description.
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:96)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.lambda$0(EclipseProjectImporter.java:63)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importToWorkspace(EclipseProjectImporter.java:63)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:132)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.access$1(ProjectsManager.java:126)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager$2.run(ProjectsManager.java:120)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:38)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:733)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5733)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5690)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:113)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:217)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: org.eclipse.core.internal.resources.ResourceException: Invalid project description.
	at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:170)
	at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:54)
	at org.eclipse.core.internal.resources.Project.create(Project.java:264)
	at org.eclipse.core.internal.resources.Project.create(Project.java:248)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:92)
	... 17 more

It would be nice to know which project it is and what caused this

Environment
  • Operating System: macOS 10.12.6 (16G1314)
  • JDK version: java version "1.8.0_144"
  • Visual Studio Code version: 1.24.1 (1.24.1)
  • Java extension version: 0.27.0
Steps To Reproduce

See above

[attach a sample project reproducing the error] -> that's exactly the problem!!
attach logs

Current Result

Only stacktrace is printed to the console

Expected Result

Output more infos, so that the issue can be fixed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at EclipseProjectImporter.importDir in EclipseProjectImporter.java, where the stack trace shows project creation failing, and trace the directory being imported. Reproduce with the reported SAP Hybris workspace and improve the diagnostic output so it identifies the project and cause of the invalid description.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.