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

UnsupportedOperationException in the output tabs for language servers. #207

Closed
turkeylurkey opened this issue Dec 13, 2022 · 6 comments
Closed
Assignees
Labels
5 Estimated story points bug Something isn't working language client language server integration should-fix
Milestone

Comments

@turkeylurkey
Copy link
Member

lsp4jakarta and lcls output tabs included this exception
Dec. 12, 2022 3:58:14 P.M. org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleNotification
WARNING: Notification threw an exception: {
"jsonrpc": "2.0",
"method": "$/setTrace",
"params": {
"value": "off"
}
}
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
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 io.openliberty.tools.langserver.common.ParentProcessWatcher.lambda$apply$0(ParentProcessWatcher.java:154)
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(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 12 more
Caused by: java.lang.UnsupportedOperationException
at org.eclipse.lsp4j.services.LanguageServer.setTrace(LanguageServer.java:125)
... 17 more

@turkeylurkey turkeylurkey added the bug Something isn't working label Dec 13, 2022
@TrevCraw TrevCraw added should-fix 5 Estimated story points labels Jan 18, 2023
@TrevCraw TrevCraw added this to the GA milestone Jan 18, 2023
@TrevCraw TrevCraw added the language client language server integration label Feb 9, 2023
@TrevCraw TrevCraw changed the title Exception in the output tabs for language servers. UnsupportedOperationException in the output tabs for language servers. Feb 21, 2023
@TrevCraw
Copy link
Contributor

Hit this issue again while trying to recreate #247

@yeekangc
Copy link
Member

yeekangc commented May 29, 2023

Unsure how we can recreate this issue.

Need to determine how pervasive this issue is.

@rumanaHaque
Copy link

In my testing with VSCode using the latest driver dated May 29th, liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix, I was not able to recreate this exception.

@dessina-devasia dessina-devasia self-assigned this Oct 25, 2023
@TrevCraw
Copy link
Contributor

@gilbysunil14 ran into this issue again and opened a duplicate here: #346

@gilbysunil14
Copy link

gilbysunil14 commented Oct 22, 2024

Found similar issue in eclipse-jdtls repo (eclipse-jdtls/eclipse.jdt.ls#2891) where an UnsupportedOperationException is thrown at org.eclipse.lsp4j.services.LanguageServer.setTrace. A proposed solution can be found at eclipse-jdtls/eclipse.jdt.ls#2893 to make the '$/setTrace' as empty to avoid throwing UnsupportedOperationException.

A similar change for setTrace() as was done in eclipse-lsp4j repo for getNotebookDocumentService() here: eclipse-lsp4j/lsp4j@04b0c61#diff-c253172d13cae9e4a8c919ba451df40be7096aad30d01638383c6ed0497e7f19R92

Raised this issue in lsp4j repo here: eclipse-lsp4j/lsp4j#853

@TrevCraw TrevCraw modified the milestones: GA, 24.0.11 Oct 27, 2024
@gilbysunil14
Copy link

gilbysunil14 commented Nov 1, 2024

Closing this issue since the solution has been provided in the lsp4jakarta PR eclipse/lsp4jakarta#531 as well as liberty language server OpenLiberty/liberty-language-server#321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 Estimated story points bug Something isn't working language client language server integration should-fix
Projects
Development

No branches or pull requests

6 participants