redhat-developer / redhat-developer/vscode-java

"IllegalArgumentException: Path must include project and resource name" when unloadable .project file is present

Open
#1,447 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Java extension is not working when opening some folders (it works for soem others).
For instance when opening the folder examples of https://github.com/apache/camel-k/tree/master/examples

there is this error in output:

[Error - 3:33:47 PM] May 13, 2020 3:33:47 PM An internal error occurred during: "Initialize workspace".
Path must include project and resource name: /examples
java.lang.IllegalArgumentException: Path must include project and resource name: /examples
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:66)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2122)
	at org.eclipse.core.internal.resources.Container.getFolder(Container.java:205)
	at org.eclipse.jdt.ls.core.internal.managers.StandardProjectsManager.registerWatchers(StandardProjectsManager.java:311)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer$1.run(JDTLanguageServer.java:277)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Environment
  • Operating System: Fedora 31
  • JDK version: Java 8
  • Visual Studio Code version: 1.45.0
  • Java extension version: 0.61.0
Steps To Reproduce
  1. clone locally https://github.com/apache/camel-k/
  2. in VS Code, File -> Open Folder...
  3. select the examples folder inside the cloned repository
  4. Open one of the Java files
    --> stack trace in output log
    --> several errors reported in files

[Please attach a sample project reproducing the error]

full log with trace activated:
https://gist.github.com/apupier/ca016099587a7730745d1841b094f7e6

Current Result
Expected Result
Additional Informations

it was working few weeks/months ago seems not, i tried with VS Code 1.42.1 and extension 0.55.1 and there was already the issue.

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

Reproduce the failure by opening the apache/camel-k examples folder in VS Code and review the linked full log. Start at StandardProjectsManager.java:311 and JDTLanguageServer.java:277 in the stack trace; done means opening the folder no longer produces the IllegalArgumentException or related file errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.