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

No delegateCommandHandler for vscode.java.resolveMainMethod #1449

Closed
HackerJem opened this issue Feb 25, 2024 · 2 comments
Closed

No delegateCommandHandler for vscode.java.resolveMainMethod #1449

HackerJem opened this issue Feb 25, 2024 · 2 comments

Comments

@HackerJem
Copy link

Screenshot (284)
[provide a description of the issue]

Environment
  • Operating System:
  • JDK version:
  • Visual Studio Code version:
  • Java extension version:
  • Java Debugger extension version:
Steps To Reproduce
  1. [step 1]
  2. [step 2]

[attach a sample project reproducing the error]
attach logs

Current Result
Expected Result
Additional Informations
@Skermin8r
Copy link

Skermin8r commented Feb 26, 2024

I too was having this issue. Found this in the 'Java Language Server Log':

Contains: Cannot extract bundle symbolicName or version c:\Users\ME\.vscode\extensions\vscjava.vscode-java-debug-0.56.2024021907\server\com.microsoft.java.debug.plugin-0.51.1.jar
java.nio.file.NoSuchFileException: c:\Users\ME\.vscode\extensions\vscjava.vscode-java-debug-0.56.2024021907\server\com.microsoft.java.debug.plugin-0.51.1.jar
at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
at java.base/java.nio.file.Files.readAttributes(Unknown Source)
at java.base/java.util.zip.ZipFile$Source.get(Unknown Source)
at java.base/java.util.zip.ZipFile$CleanableResource.(Unknown Source)
at java.base/java.util.zip.ZipFile.(Unknown Source)
at java.base/java.util.zip.ZipFile.(Unknown Source)
at java.base/java.util.jar.JarFile.(Unknown Source)
at java.base/java.util.jar.JarFile.(Unknown Source)
at java.base/java.util.jar.JarFile.(Unknown Source)
at org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.getBundleInfo(BundleUtils.java:328)
at org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.loadBundles(BundleUtils.java:120)
at org.eclipse.jdt.ls.core.internal.handlers.InitHandler.handleInitializationOptions(InitHandler.java:109)
at org.eclipse.jdt.ls.core.internal.handlers.BaseInitHandler.initialize(BaseInitHandler.java:64)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:284)
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$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
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.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:144)
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)

Found this in the directory:

C:\Users\ME\.vscode\extensions\vscjava.vscode-java-debug-0.56.2024021907\com.microsoft.java.debug.plugin-0.51.0.jar

Created a copy of THIS file and renamed it:

C:\Users\ME\.vscode\extensions\vscjava.vscode-java-debug-0.56.2024021907\com.microsoft.java.debug.plugin-0.51.1.jar

Restarted VScode and am now able to launch/debug Java code.

@testforstephen
Copy link
Contributor

The pre-release version 0.56.2024022605 should have fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants