redhat-developer / redhat-developer/vscode-java

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

未关闭
#1,447 4 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

ls-error/crash ux
主要语言
TypeScript
星标
2.3k
派生
547
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

通过在 VS Code 中打开 apache/camel-k 的 examples 文件夹并查看链接的完整日志来重现该故障。从堆栈跟踪中的 StandardProjectsManager.java:311 和 JDTLanguageServer.java:277 开始;打开文件夹不再产生 IllegalArgumentException 或相关文件错误即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。