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

JDTLS exited with status code 13 #21

Open
ildella opened this issue Jun 10, 2022 · 17 comments
Open

JDTLS exited with status code 13 #21

ildella opened this issue Jun 10, 2022 · 17 comments
Labels
bug Something isn't working needs more info

Comments

@ildella
Copy link

ildella commented Jun 10, 2022

After first install LSP + LSP-jdtls I got it working.

After a few days, it stop working with this error in the picture here.

I managed to get it back to work once, deleting the folder ~/.cache/sublime-text/Package Storage/LSP-jdtls but now is still not working.
I can'f find any log anywhere else.

It is using java 18, but the same result I get with Java 11.
Running under Ubuntu 22.04 and latest Sublime 4 build.

As additional info, I debugged the plugin and printed the return json at the end of additional_variables(cls) method

{'java_executable': '~/.sdkman/candidates/java/18.0.1-open/bin/java', 'launcher_version': '1.6.400.v20210924-0641', 'watch_parent_process': 'true', 'serverdir': '/home/ildella/.cache/sublime-text/Package Storage/LSP-jdtls/server/1.13.0-202206092056', 'datadir': '/home/ildella/.cache/sublime-text/Package Storage/LSP-jdtls/data', 'jdtls_platform': 'linux'}
@ildella
Copy link
Author

ildella commented Jun 13, 2022

I did run the Server Troubleshoot command where I found the actual shell command, then run it and the output did finally point me to a log file, here it is:

$ cat ~/.cache/sublime-text/Package\ Storage/LSP-jdtls/server/1.13.0-202206092056/config_linux/1655120899638.log 
!SESSION 2022-06-13 13:48:19.570 -----------------------------------------------
eclipse.buildId=unknown
java.version=18.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -data /home/ildella/.cache/sublime-text/Package Storage/LSP-jdtls/data

!ENTRY org.eclipse.osgi 4 0 2022-06-13 13:48:19.750
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:81)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

@meengit
Copy link

meengit commented Jun 13, 2022

Hi @ildella, I can confirm having the same issue since today. LSP-jdtls and directly configured jdtls in LSP Settings does not work anymore. Unfortunately, I'm under pressure in these days and can't dig into the issue before the end of the week. The LSP Troubleshooting also gives me a different error message:

Screenshot 2022-06-13 at 18 02 03

I also can't exclude misconfiguration on my side at the moment. The only thing I can say is: it worked without any issue until today. Since today, I also struggle with JDTLS exited with status code 13.

@ildella
Copy link
Author

ildella commented Jun 13, 2022

I fixed it setting the version in LSP settings to

"version": "1.12.0-202206011637",

I know for sure that a couple time did work in the past week, and that random effect was suspect. It's probably related to some build being broken or incompatible or missing or... sonething else.

Fixing the version feels a more stable solution anyway, maybe it could become the default in place of the version: '' that just fetch the latest snapshot. As a minimum I would mention this important aspect in the README.

For posterity: available versions can be found here: https://download.eclipse.org/jdtls/snapshots/

@rwols
Copy link
Member

rwols commented Jun 13, 2022

See also #12

@meengit
Copy link

meengit commented Jun 13, 2022

Thank you very much for the responses @ildella and @rwols. Setting the version explicitly worked!

@ildella ildella closed this as completed Jun 14, 2022
@ildella ildella reopened this Jun 14, 2022
@ildella
Copy link
Author

ildella commented Jun 14, 2022

It seem that the problem runs much deeper and today is still not working.

Is there a way to tell LSP plugin to connect to an already running JDTLS server that I can start from terminal?

[UPDATE]

Basically every once in a while after restart, JDTLS give me the 13 error code.
To fix it, I basically change the "version" in the config to download another, any would do, and it starts again.

@LDAP LDAP mentioned this issue Jun 24, 2022
@LDAP
Copy link
Collaborator

LDAP commented Jun 24, 2022

I believe changing the server version fixes this issue because part of the update procedure is clearing the data directory.

I don't think pinning the server version will fix this, please try #22 anyway and report back.

Can you please provide more information on your system? And how are you closing sublime? In my opinion, what you really face is a corruption of the data directory. Maybe the server cannot gracefully shut down on your system.

@ildella
Copy link
Author

ildella commented Jun 29, 2022

I've tried but with not more luck.
As I stated in the UPDATE in my last message #21 (comment) even when I set the version, the plugins fails to start and I have to change the version again.

It seems to me that something got stuck, and only a fresh start fixes it.

@LDAP
Copy link
Collaborator

LDAP commented Jun 29, 2022

I cannot reproduce the issue on my system.

Please provide more info on your system and a complete copy of the Throubleshoot Server command.

How are you closing sublime? (eg. if you use a command, provide the exact command)

@LDAP LDAP added bug Something isn't working needs more info labels Jun 29, 2022
@MFAshby
Copy link
Contributor

MFAshby commented Oct 3, 2022

jdtls.log.txt

Hi, I'm hitting the same issue. Looks like something changed in the jdtls jar?

@MFAshby
Copy link
Contributor

MFAshby commented Oct 3, 2022

yeah it looks like this: eclipse-jdtls/eclipse.jdt.ls#1520

I'm on java 11, and it seems like that isn't supported in later versions of jdtls.

@MFAshby
Copy link
Contributor

MFAshby commented Oct 3, 2022

Workaround: download a newer JDK and set "java.home" property in LSP-jdtls.settings, e.g.

{
        "settings": {
                "java.home": "/usr/lib/jvm/java-19-openjdk/"
        }
}

Suggested change in LDP-jdtls; error message if java version is too old for jdtls?

@AirBashX
Copy link

AirBashX commented Nov 1, 2022

It seems that the new version of Eclipse only supports JDK11

@Jeangowhy
Copy link

What is going on when the Troubleshoot Server return “HTTP ERROR NOT FOUND”?

@LDAP
Copy link
Collaborator

LDAP commented Oct 2, 2023

What is going on when the Troubleshoot Server return “HTTP ERROR NOT FOUND”?

Please open a new issue.
Include the last lines from the Sublime console and the LSP log (LSP: Toggle Log Panel command).

@RafaTeya
Copy link

I fixed it setting the version in LSP settings to

"version": "1.12.0-202206011637",

I know for sure that a couple time did work in the past week, and that random effect was suspect. It's probably related to some build being broken or incompatible or missing or... sonething else.

Fixing the version feels a more stable solution anyway, maybe it could become the default in place of the version: '' that just fetch the latest snapshot. As a minimum I would mention this important aspect in the README.

For posterity: available versions can be found here: https://download.eclipse.org/jdtls/snapshots/

Pinning the version worked for me.

@mataha
Copy link
Contributor

mataha commented Jul 5, 2024

I'd like to suggest downloading a JDK exclusively for use with jdt.ls, just like Node-based LSP clients do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info
Projects
None yet
Development

No branches or pull requests

9 participants