lidulibai / coc-java-vimspector

An extension for coc.nvim to enable Java debugging via jdt.ls
MIT License
10 stars 1 forks source link

Lauch Failed Cannot access sun.security.action.GetPropertyAction in module java.base when using Gradle #4

Closed Daniel-Radloff closed 1 year ago

Daniel-Radloff commented 1 year ago

Hi there. Im having a issue debugging using gradle as a project manager. The error looks like this:

2023-03-17 17:04:55,203 - INFO - Debug Adapter Started 2023-03-17 17:04:55,204 - DEBUG - Sending Message: {"command": "initialize", "arguments": {"adapterID": "vscode-java", "clientID": "vimspector", "clientName": "vimspector", "linesStartAt1": true, "columnsStartAt1": true, "locale": "en_GB", "pathFormat": "path", "supportsVariableType": true, "supportsVariablePaging": false, "supportsRunInTerminalRequest": true, "supportsMemoryReferences": true}, "seq": 0, "type": "request"} 2023-03-17 17:04:55,368 - DEBUG - Message received: {'success': True, 'request_seq': 0, 'command': 'initialize', 'body': {'supportsConfigurationDoneRequest': True, 'supportsHitConditionalBreakpoints': True, 'supportsConditionalBreakpoints': True, 'supportsEvaluateForHovers': True, 'supportsCompletionsRequest': True, 'supportsRestartFrame': True, 'supportsSetVariable': True, 'supportsRestartRequest': False, 'supportTerminateDebuggee': True, 'supportsDelayedStackTraceLoading': False, 'supportsLogPoints': True, 'supportsExceptionInfoRequest': True, 'exceptionBreakpointFilters': [{'label': 'Uncaught Exceptions', 'filter': 'uncaught'}, {'label': 'Caught Exceptions', 'filter': 'caught'}], 'supportsDataBreakpoints': True, 'supportsClipboardContext': True}, 'seq': 1, 'type': 'response'} 2023-03-17 17:04:55,368 - DEBUG - Sending Message: {"command": "launch", "arguments": {"cwd": "/home/daniel/Documents/School Work/Third Year/First Sem/COS341/Prac/app/src/main/java/prac", "projectName": "app", "vmArgs": " -XX:+ShowCodeDetailsInExceptionMessages", "classPathString": "/home/daniel/Documents/School Work/Third Year/First Sem/COS341/Prac/app/bin/main /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/31.1-jre/60458f877d055d0c9114d9e1a2efb737b4bc282c/guava-31.1-jre.jar /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar /home/daniel/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/3.12.0/d5692f0526415fcc6de94bb5bfbd3afd9dd3b3e5/checker-qual-3.12.0.jar /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.11.0/c5a0ace696d3f8b1c1d8cc036d8c03cc0cbe6b69/error_prone_annotations-2.11.0.jar /home/daniel/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.3/ba035118bc8bac37d7eff77700720999acd9986d/j2objc-annotations-1.3.jar", "console": "externalTerminal", "shortenCommandLine": "argfile", "name": "CodeLens (Launch) - TreeToNFA", "modulePaths": [], "type": "java", "mainClass": "prac.TreeToNFA", "request": "launch", "classPaths": ["/home/daniel/Documents/School Work/Third Year/First Sem/COS341/Prac/app/bin/main", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/31.1-jre/60458f877d055d0c9114d9e1a2efb737b4bc282c/guava-31.1-jre.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/3.12.0/d5692f0526415fcc6de94bb5bfbd3afd9dd3b3e5/checker-qual-3.12.0.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.11.0/c5a0ace696d3f8b1c1d8cc036d8c03cc0cbe6b69/error_prone_annotations-2.11.0.jar", "/home/daniel/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.3/ba035118bc8bac37d7eff77700720999acd9986d/j2objc-annotations-1.3.jar"], "javaExec": "/usr/lib/jvm/java-19-openjdk/bin/java"}, "seq": 1, "type": "request"} 2023-03-17 17:04:55,388 - DEBUG - Message received: {'success': False, 'message': 'class com.microsoft.java.debug.core.adapter.AdapterUtils (in unnamed module @0x3b2dd7d5) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x3b2dd7d5', 'request_seq': 1, 'command': 'launch', 'body': {'error': {'id': 1000, 'format': 'class com.microsoft.java.debug.core.adapter.AdapterUtils (in unnamed module @0x3b2dd7d5) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x3b2dd7d5'}}, 'seq': 2, 'type': 'response'} 2023-03-17 17:04:55,388 - INFO - Request failed (handled): class com.microsoft.java.debug.core.adapter.AdapterUtils (in unnamed module @0x3b2dd7d5) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x3b2dd7d5 2023-03-17 17:04:55,388 - INFO - Launch failed: Launch Failed

class com.microsoft.java.debug.core.adapter.AdapterUtils (in unnamed module @0x3b2dd7d5) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x3b2dd7d5

Use :VimspectorReset to close

Pls help, thanks :)

Daniel-Radloff commented 1 year ago

I found the issue, the com.microsoft.java.debug.plugin is super out of date and causes build issues, Upgrading to the latest version solves all issues. There should be a push to this repository that i can do rq and it should fix for everyone.

lidulibai commented 1 year ago

Great!