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

Rename not completing with binary #424

Closed
JVimes opened this issue Feb 15, 2021 · 5 comments · Fixed by eclipse/lemminx#990 or enxio/lsp4xml#115
Closed

Rename not completing with binary #424

JVimes opened this issue Feb 15, 2021 · 5 comments · Fixed by eclipse/lemminx#990 or enxio/lsp4xml#115
Assignees
Labels
binary bug Something isn't working rename
Milestone

Comments

@JVimes
Copy link

JVimes commented Feb 15, 2021

I installed v0.15.1-117 and tried to rename an element. The operation never completed, progress bar goes forever:

2021-02-15_15h50_44.mp4

Windows 10, version 20H2 (OS Build 19042.804).
VSCode v1.53.2

@angelozerr
Copy link
Contributor

Are you using binary support?

@JVimes
Copy link
Author

JVimes commented Feb 16, 2021

I don't think so? (Edit: I am) I don't know what that is and I haven't changed any extension settings.

@angelozerr
Copy link
Contributor

angelozerr commented Feb 17, 2021

I can reproduce the problem when binary support is activated (when it is disable the refactoring is working). Here the stack trace:

[Error - 14:30:27] Feb 17, 2021 02:30:27 org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError()
Message: Unable to invoke no-args constructor for class org.eclipse.lsp4j.RenameParams. Registering an InstanceCreator with Gson for this type may fix this problem.
java.lang.RuntimeException: Unable to invoke no-args constructor for class org.eclipse.lsp4j.RenameParams. Registering an InstanceCreator with Gson for this type may fix this problem.
	at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:226)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210)
	at com.google.gson.Gson.fromJson(Gson.java:888)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.fromJson(MessageTypeAdapter.java:329)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.parseParams(MessageTypeAdapter.java:249)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:119)
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:55)
	at com.google.gson.Gson.fromJson(Gson.java:888)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:119)
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:114)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:193)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(Thread.java:834)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Method.java:566)
	at com.google.gson.internal.UnsafeAllocator$1.newInstance(UnsafeAllocator.java:50)
	at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:223)
	... 19 more
Caused by: java.lang.IllegalArgumentException: Class org.eclipse.lsp4j.RenameParams is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
	at com.oracle.svm.core.graal.snippets.SubstrateAllocationSnippets.hubErrorStub(SubstrateAllocationSnippets.java:246)
	at sun.misc.Unsafe.allocateInstance(Unsafe.java:840)
	... 22 more

With Java support it's working. @JVimes it seems that you are using binary support (Your Java home is not configured correctly). But we need to fix the bug with binary support.

@angelozerr angelozerr added binary bug Something isn't working rename labels Feb 17, 2021
@angelozerr angelozerr changed the title Rename not completing Rename not completing with binary Feb 17, 2021
angelozerr pushed a commit to angelozerr/lemminx that referenced this issue Feb 17, 2021
Fixes redhat-developer/vscode-xml#424

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr added this to the 0.16.0 milestone Feb 17, 2021
@angelozerr angelozerr self-assigned this Feb 17, 2021
@JVimes
Copy link
Author

JVimes commented Feb 17, 2021

Oh I see. Yes, I must be using binary support (Java is not installed). Thank you for investigating.

@angelozerr
Copy link
Contributor

Oh I see. Yes, I must be using binary support (Java is not installed). Thank you for investigating.

You are welcome, I created a PR for that eclipse/lemminx#990

angelozerr pushed a commit to eclipse/lemminx that referenced this issue Feb 17, 2021
Fixes redhat-developer/vscode-xml#424

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary bug Something isn't working rename
Projects
None yet
2 participants