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

completionItem/resolve fails with NullPointerException #414

Closed
TrevCraw opened this issue Jul 26, 2023 · 1 comment
Closed

completionItem/resolve fails with NullPointerException #414

TrevCraw opened this issue Jul 26, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@TrevCraw
Copy link

This behaviour was observed while using the latest release version (0.8.0) of the Tools for MicroProfile VS Code extension with a Maven project configured with MP 5.0 (also tried with MP 4.1). When typing ctrl + space to pull up a list of snippets, the below NPE occurs, but the snippets can still be selected.

[Error - 5:09:50 PM] Request completionItem/resolve failed.
  Message: Internal error.
  Code: -32603 
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.request(GenericEndpoint.java:120)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
	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)
	... 11 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.lsp4mp.services.properties.CompletionData.getUri()" because the return value of "org.eclipse.lsp4mp.services.properties.CompletionData.getCompletionData(org.eclipse.lsp4j.CompletionItem)" is null
	at org.eclipse.lsp4mp.ls.MicroProfileTextDocumentService.resolveCompletionItem(MicroProfileTextDocumentService.java:156)
	... 16 more
@angelozerr
Copy link
Contributor

Duplicate of redhat-developer/vscode-microprofile#161 which has been fixed.

I suggest that you swith to vscode-microprofile prerelease and you should avoid having this error.

@angelozerr angelozerr added the duplicate This issue or pull request already exists label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants