{"action":"created","issue":{"url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/244","repository_url":"https://api.github.com/repos/redhat-developer/vscode-java","labels_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/244/comments","events_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/244/events","html_url":"https://github.com/redhat-developer/vscode-java/issues/244","id":237748059,"number":244,"title":"\"Invalid project description\" thrown when opening Eclipse projects","user":{"login":"devinscodev","id":6452466,"avatar_url":"https://avatars1.githubusercontent.com/u/6452466?v=3","gravatar_id":"","url":"https://api.github.com/users/devinscodev","html_url":"https://github.com/devinscodev","followers_url":"https://api.github.com/users/devinscodev/followers","following_url":"https://api.github.com/users/devinscodev/following{/other_user}","gists_url":"https://api.github.com/users/devinscodev/gists{/gist_id}","starred_url":"https://api.github.com/users/devinscodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinscodev/subscriptions","organizations_url":"https://api.github.com/users/devinscodev/orgs","repos_url":"https://api.github.com/users/devinscodev/repos","events_url":"https://api.github.com/users/devinscodev/events{/privacy}","received_events_url":"https://api.github.com/users/devinscodev/received_events","type":"User","site_admin":false},"labels":[{"id":423855029,"url":"https://api.github.com/repos/redhat-developer/vscode-java/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-22T06:52:49Z","updated_at":"2017-06-22T13:11:02Z","closed_at":null,"body":"I have used Eclipse Neon's Java project wizard to create a simple \"Hello, World!\" Java project (attached below). I then close Eclipse and open the project's root directory ```Test``` in VSCode. The first time I do this, everything works fine. But on all subsequent attempts to open ```Test``` in VSCode, the Java Language Server throws a  ```ResourceException``` with the message \"Invalid project description\". The relevant lines of the Java Language Server's workspace log are included below. I believe I originally experienced this problem in April 2017, when I first started using this extension.\r\n\r\n##### Environment\r\n- Operating System: Windows 10\r\n- JDK version: 1.8.0.131\r\n- Visual Studio Code version: 1.13.1\r\n- Java extension version: 0.6.0\r\n\r\n##### Steps To Reproduce\r\n1. Open the attached project's root directory in VSCode\r\n2. Open ```src/pckg/Test.java``` from VSCode's file explorer\r\n3. Wait for the Java Language Server to start up. It should load with no errors since this is the first invocation for this workspace.\r\n4. Exit VSCode\r\n5. Repeat steps 1 through 3. This time, the Java Language Server will fail to start, throwing a  ```ResourceException``` with the message \"Invalid project description\".\r\n\r\n##### Project:\r\n[Test.zip](https://github.com/redhat-developer/vscode-java/files/1093829/Test.zip)\r\n\r\n##### Java Language Server workspace log:\r\n```\r\n!SESSION 2017-06-22 01:25:54.168 -----------------------------------------------\r\neclipse.buildId=unknown\r\njava.version=1.8.0_65\r\njava.vendor=Oracle Corporation\r\nBootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US\r\nCommand-line arguments:  -data C:\\Users\\Devin\\AppData\\Roaming\\Code\\User\\workspaceStorage\\838697bd63daded4e95b1eedb4f55d68\\redhat.java\\jdt_ws\r\n\r\n!ENTRY org.eclipse.core.resources 2 10035 2017-06-22 01:25:55.294\r\n!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:55.545\r\n!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:55.679\r\n!MESSAGE >> initialize\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:55.691\r\n!MESSAGE Initializing Java Language Server 0.1.0.201706151944\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:55.742\r\n!MESSAGE >> workspace/didChangeConfiguration\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:57.475\r\n!MESSAGE >>New configuration: {java={configuration={maven={userSettings=null}, updateBuildConfiguration=interactive}, errors={incompleteClasspath={severity=warning}}, home=null, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication}}, referencesCodeLens={enabled=true}, trace={server=verbose}}}\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:57.496\r\n!MESSAGE Importing Eclipse project(s)\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:57.507\r\n!MESSAGE >> document/didOpen\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 4 0 2017-06-22 01:25:57.535\r\n!MESSAGE Problem importing to workspace\r\n!STACK 0\r\njava.lang.RuntimeException: org.eclipse.core.internal.resources.ResourceException: Invalid project description.\r\n\tat org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:90)\r\n\tat org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.lambda$0(EclipseProjectImporter.java:59)\r\n\tat java.util.ArrayList.forEach(ArrayList.java:1249)\r\n\tat java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)\r\n\tat org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importToWorkspace(EclipseProjectImporter.java:59)\r\n\tat org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:75)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.run(InitHandler.java:108)\r\n\tat org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)\r\nCaused by: org.eclipse.core.internal.resources.ResourceException: Invalid project description.\r\n\tat org.eclipse.core.internal.resources.Project.checkDescription(Project.java:169)\r\n\tat org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:53)\r\n\tat org.eclipse.core.internal.resources.Project.create(Project.java:263)\r\n\tat org.eclipse.core.internal.resources.Project.create(Project.java:247)\r\n\tat org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:86)\r\n\t... 7 more\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:58.159\r\n!MESSAGE begin problem for Test.java\r\n\r\n!ENTRY org.eclipse.jdt.ls.core 1 0 2017-06-22 01:25:58.175\r\n!MESSAGE end reporting for Test.java\r\n```"},"comment":{"url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/comments/310375433","html_url":"https://github.com/redhat-developer/vscode-java/issues/244#issuecomment-310375433","issue_url":"https://api.github.com/repos/redhat-developer/vscode-java/issues/244","id":310375433,"user":{"login":"fbricon","id":148698,"avatar_url":"https://avatars0.githubusercontent.com/u/148698?v=3","gravatar_id":"","url":"https://api.github.com/users/fbricon","html_url":"https://github.com/fbricon","followers_url":"https://api.github.com/users/fbricon/followers","following_url":"https://api.github.com/users/fbricon/following{/other_user}","gists_url":"https://api.github.com/users/fbricon/gists{/gist_id}","starred_url":"https://api.github.com/users/fbricon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbricon/subscriptions","organizations_url":"https://api.github.com/users/fbricon/orgs","repos_url":"https://api.github.com/users/fbricon/repos","events_url":"https://api.github.com/users/fbricon/events{/privacy}","received_events_url":"https://api.github.com/users/fbricon/received_events","type":"User","site_admin":false},"created_at":"2017-06-22T13:11:02Z","updated_at":"2017-06-22T13:11:02Z","body":"@snjeza also `Project.checkDescription` throws a ResourceException wrapping a MultiStatus. But it seems the underlying statuses/exceptions don't surface to the logger, so we're missing important info. We can prolly do better in `JavaLanguageServerPlugin.log`. Do you mind checking that too?"}}
{"actor":{"display_login":"fbricon"}}