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

faiure in json getting classpath #3146

Closed
benleis1 opened this issue May 2, 2024 · 1 comment
Closed

faiure in json getting classpath #3146

benleis1 opened this issue May 2, 2024 · 1 comment

Comments

@benleis1
Copy link

benleis1 commented May 2, 2024

I'm running emacs. + jdtls 1.35 and failing to get dap mode to run junit tests. Tracing back it. appears the vscode.java.resolveClasspath call is failing as below (which looks like a secondary failure but I can't see the actual problem since its blocked by the stack trace dump)

Is this a known issue?

May 1, 2024, 9:40:18 PM Error in calling delegate command handler
Failed making field 'java.lang.StackTraceElement#classLoaderName' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.
com.google.gson.JsonIOException: Failed making field 'java.lang.StackTraceElement#classLoaderName' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.
at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:38)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:286)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
at com.google.gson.Gson.getAdapter(Gson.java:556)
at com.google.gson.internal.bind.ArrayTypeAdapter$1.create(ArrayTypeAdapter.java:45)
at com.google.gson.Gson.getAdapter(Gson.java:556)
at com.google.gson.Gson.toJson(Gson.java:834)
at com.google.gson.Gson.toJson(Gson.java:812)
at com.google.gson.Gson.toJson(Gson.java:759)
at com.google.gson.Gson.toJson(Gson.java:736)
at com.microsoft.java.debug.core.protocol.JsonUtils.toJson(JsonUtils.java:42)
at com.microsoft.java.debug.core.UsageDataStore.logErrorData(UsageDataStore.java:90)
at com.microsoft.java.debug.plugin.internal.UsageDataLogHandler.publish(UsageDataLogHandler.java:37)
at java.logging/java.util.logging.Logger.log(Logger.java:980)
at java.logging/java.util.logging.Logger.doLog(Logger.java:1007)
at java.logging/java.util.logging.Logger.log(Logger.java:1118)
at com.microsoft.java.debug.plugin.internal.ResolveClasspathsHandler.resolveClasspaths(ResolveClasspathsHandler.java:78)
at com.microsoft.java.debug.plugin.internal.JavaDebugDelegateCommandHandler.executeCommand(JavaDebugDelegateCommandHandler.java:62)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:230)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:220)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:585)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.StackTraceElement.classLoaderName accessible: module java.base does not "opens java.lang" to unnamed module @7470e630
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:35)
... 29 more

@benleis1 benleis1 changed the title faiure in json getting claaspath faiure in json getting classpath May 2, 2024
@fbricon
Copy link
Contributor

fbricon commented May 2, 2024

It's an error in the com.microsoft.java.debug plugin. Please open a ticket in https://github.com/microsoft/java-debug/issues

@fbricon fbricon closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants