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

Exception throwing in Language Server for JakartaEE and Language Server for Liberty in Java 21 #346

Open
Tracked by #335
gilbysunil14 opened this issue Oct 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gilbysunil14
Copy link

gilbysunil14 commented Oct 15, 2024

The following exception is thrown in Language support for JakartaEE and Language support for Liberty while using Java 21 as the runtime environment. To replicate the issue follow the below steps:

  1. Create a new open liberty project using https://openliberty.io/start/ by giving Java SE version as 21.
  2. Open this project in the VS code.
  3. Take the output tab and select Language support for JakkartaEE or Language support for Liberty. There you could find the following exception.
rec-20241015144723-1_UMS1bqll.mp4
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 gilbysunil14 changed the title Exception throwing in Language Server for JakartaEE and Liberty Exception throwing in Language Server for JakartaEE and Language Server for Liberty in Java 21 Oct 15, 2024
@gilbysunil14 gilbysunil14 added the bug Something isn't working label Oct 15, 2024
@gilbysunil14 gilbysunil14 self-assigned this Oct 15, 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
Development

No branches or pull requests

1 participant