jdtls: 08.03.2021, 23:12:44 Error parsing message: com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull
Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull
com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull
at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:897)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.google.gson.Gson.fromJson(Gson.java:817)
at com.microsoft.java.debug.core.protocol.JsonUtils.fromJson(JsonUtils.java:26)
at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.processData(AbstractProtocolServer.java:219)
at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.run(AbstractProtocolServer.java:98)
at com.microsoft.java.debug.core.adapter.ProtocolServer.run(ProtocolServer.java:61)
at com.microsoft.java.debug.plugin.internal.JavaDebugServer$2.run(JavaDebugServer.java:136)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Commands that have
argumentsset tonullthrow an exception:However, commands that do not need arguments, e.g. (
configurationDone,threads) should be able to set arguments tonullas the Thread Request does not set any restrictions. See here.The response to
threadsrequest does not always contain thethreadskey.Protocol:
See here.
When stepping into classes that are not represented by a project file, Java-Debug returns a path with URI scheme
jdt://which then can be used to retrieve the class content using thejava/classFileContentsLSP request. Java-Debug should instead set the sourceReference value > 0 and the contents of the source must be retrieved through thesourcerequest (See Could not load source '': SourceRequest: property 'sourceReference' is missing, null, or empty. #259 (comment)).This requires a special workaround in Java adapter daveleroy/SublimeDebugger#106.