sublimelsp / LSP-jdtls

Convenience package for the Eclipse JDT language server
https://packagecontrol.io/packages/LSP-jdtls
MIT License
30 stars 4 forks source link

HTTP Error 404 when starting the language server (exit code -1) #40

Closed yazeed1s closed 1 year ago

yazeed1s commented 1 year ago

Hello there,

when I open a java project I get this error:

Screenshot 2023-03-15 at 11 37 36 AM

The output of the troubleshooting is:

Troubleshooting: jdtls

Version

 - selector

source.java

 - priority_selector

source.java

 - init_options
```json
{}

Active view

Project / Workspace

LSP configuration

{
  "clients": {
    "clangd": {
      "enabled": true
    }, 
    "gopls": {
      "analyses": {
        "unreachable": true, 
        "unusedparams": true
      }, 
      "command": [
        "/Users/yazeed_1/go/bin/gopls"
      ], 
      "enabled": true, 
      "env": {
        "PATH": "/Users/yazeed_1/go/bin:/usr/local/go/bin"
      }, 
      "hints": {
        "assignVariableTypes": true, 
        "constantValues": true, 
        "functionTypeParameters": true, 
        "parameterNames": true, 
        "rangeVariableTypes": true
      }, 
      "initializationOptions": {
        "experimentalWorkspaceModule": false
      }, 
      "languageId": "go", 
      "selector": "source.go", 
      "settings": {
        "gopls.completeUnimported": true, 
        "gopls.usePlaceholders": true
      }, 
      "show_references_in_quick_panel": true, 
      "syntaxes": [
        "Packages/Go/Go.sublime-syntax", 
        "Packages/GoSublime/syntax/GoSublime-Go-Recommended.sublime-syntax"
      ]
    }, 
    "jdtls": {
      "enabled": true
    }, 
    "rust-analyzer": {
      "enabled": true
    }
  }, 
  "lsp_format_on_save": true, 
  "semantic_highlighting": true, 
  "show_diagnostics_count_in_view_status": true, 
  "show_inlay_hints": true, 
  "show_references_in_quick_panel": true
}

System PATH


Am I missing something here? or is the link to download jdtls not working anymore? Thanks in advance.

LDAP commented 1 year ago

I guess you cloned the repo into the Packages folder? Can you check if there is a LSP-jdtls.sublime-package in the Installed Packages folder? Try deleting that.

yazeed1s commented 1 year ago

No the repo wasn't cloned into Packages. I tried deleting LSP-jdtls.sublime-package from Installed Packages as you suggested but the error still resist. I also tried deleting LSP itself, but no luck solving the error.

LDAP commented 1 year ago

Please check the console for a stack trace. That helps to track down if jdtls or an extension could not be downloaded. Did you install from package control then?

You can try the current main by cloning into packages and deleting the sublime-package again.

yazeed1s commented 1 year ago

Yes I installed lsp-jdtls using the package control. I will try cloning the main branch into packages and see if the problem is solved or not. Will let you know 👍

yazeed1s commented 1 year ago

Thanks @LDAP\ Update: I cloned the current branch into packages and the error now is gone, I still do not know what was the reason for the 404 error tho. the trouble shooting now outputs this

Troubleshooting: jdtls

Version

Active view

Project / Workspace

LSP configuration

{
  "clients": {
    "clangd": {
      "enabled": true
    }, 
    "gopls": {
      "analyses": {
        "unreachable": true, 
        "unusedparams": true
      }, 
      "command": [
        "/Users/yazeed_1/go/bin/gopls"
      ], 
      "enabled": true, 
      "env": {
        "PATH": "/Users/yazeed_1/go/bin:/usr/local/go/bin"
      }, 
      "hints": {
        "assignVariableTypes": true, 
        "constantValues": true, 
        "functionTypeParameters": true, 
        "parameterNames": true, 
        "rangeVariableTypes": true
      }, 
      "initializationOptions": {
        "experimentalWorkspaceModule": false
      }, 
      "languageId": "go", 
      "selector": "source.go", 
      "settings": {
        "gopls.completeUnimported": true, 
        "gopls.usePlaceholders": true
      }, 
      "syntaxes": [
        "Packages/Go/Go.sublime-syntax", 
        "Packages/GoSublime/syntax/GoSublime-Go-Recommended.sublime-syntax"
      ]
    }, 
    "rust-analyzer": {
      "enabled": true
    }
  }, 
  "diagnostics_delay_ms": 100, 
  "diagnostics_gutter_marker": "dot", 
  "link_highlight_style": "none", 
  "lsp_format_on_save": true, 
  "semantic_highlighting": true, 
  "show_diagnostics_count_in_view_status": true, 
  "show_inlay_hints": true, 
  "show_multiline_diagnostics_highlights": false, 
  "show_references_in_quick_panel": true, 
  "show_view_status": false
}

System PATH

LDAP commented 1 year ago

Maybe an old link expired or your IP hit the github api limit for some reason. I'll release the new version soon.