Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] Failed to resolve user_storage:/user/workspace-storage #8412

Open
akosyakov opened this issue Aug 21, 2020 · 2 comments
Open

[java] Failed to resolve user_storage:/user/workspace-storage #8412

akosyakov opened this issue Aug 21, 2020 · 2 comments
Labels
bug bugs found in the application java issues related to the java language

Comments

@akosyakov
Copy link
Member

[Error - 8:58:26 AM] Aug 21, 2020, 8:58:26 AM Failed to resolve user_storage:/user/workspace-storage/85bf740b9222ed461bf298d9df3a7c42/redhat.java/jdt_ws/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
Illegal character in scheme name at index 4: user_storage:/user/workspace-storage/85bf740b9222ed461bf298d9df3a7c42/redhat.java/jdt_ws/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
java.net.URISyntaxException: Illegal character in scheme name at index 4: user_storage:/user/workspace-storage/85bf740b9222ed461bf298d9df3a7c42/redhat.java/jdt_ws/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
	at java.base/java.net.URI$Parser.fail(URI.java:2913)
	at java.base/java.net.URI$Parser.checkChars(URI.java:3084)
	at java.base/java.net.URI$Parser.parse(URI.java:3110)
	at java.base/java.net.URI.<init>(URI.java:600)
	at org.eclipse.jdt.ls.core.internal.JDTUtils.toURI(JDTUtils.java:875)
	at org.eclipse.jdt.ls.core.internal.JDTUtils.findFile(JDTUtils.java:802)
	at org.eclipse.jdt.ls.core.internal.JDTUtils.getFileOrFolder(JDTUtils.java:968)
	at org.eclipse.jdt.ls.core.internal.managers.StandardProjectsManager.fileChanged(StandardProjectsManager.java:215)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceEventsHandler.didChangeWatchedFiles(WorkspaceEventsHandler.java:108)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.didChangeWatchedFiles(JDTLanguageServer.java:485)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$0(ParentProcessWatcher.java:123)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

user_storage:/user/workspace-storage looks very suspicious

@akosyakov akosyakov added bug bugs found in the application java issues related to the java language labels Aug 21, 2020
@0dinD
Copy link

0dinD commented Mar 12, 2021

The java.net.URISyntaxException is thrown because underscores are not valid characters in a URI scheme, as per section 3.1 of RFC 3986. Seeing as java.net.URI is a commonly used class in the Java standard library, it would probably be hard or at least tedious to handle the underscore in the Java language server code (not to mention, upstream libraries).

The best solution then, would be to change the URI scheme from user_storage to something like user-storage, which is standards-compliant. Of course, I don't know anything about how feasible that is, since I don't have experience with the Theia codebase (I'm guessing the user_storage scheme is Theia-related?).

@vince-fugnitto
Copy link
Member

The best solution then, would be to change the URI scheme from user_storage to something like user-storage...

I believe this is now the case thanks to #9049 for the same reasons @0dinD described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application java issues related to the java language
Projects
None yet
Development

No branches or pull requests

3 participants