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 throwing in Language Server for Liberty #320

Closed
gilbysunil14 opened this issue Nov 5, 2024 · 1 comment · Fixed by #321
Closed

UnsupportedOperationException throwing in Language Server for Liberty #320

gilbysunil14 opened this issue Nov 5, 2024 · 1 comment · Fixed by #321
Assignees
Labels
bug Something isn't working

Comments

@gilbysunil14
Copy link
Contributor

LCLS output tab include the following exception:

Oct 15, 2024 2:44:21 PM 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(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1595)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
	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)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	... 14 more
@gilbysunil14
Copy link
Contributor Author

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-lsp4jakarta: eclipse/lsp4jakarta#531

@gilbysunil14 gilbysunil14 self-assigned this Nov 5, 2024
@gilbysunil14 gilbysunil14 added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant