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

error main class could not be found or loaded #2316

Open
Fuzzyma opened this issue May 28, 2024 · 7 comments
Open

error main class could not be found or loaded #2316

Fuzzyma opened this issue May 28, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Fuzzyma
Copy link

Fuzzyma commented May 28, 2024

Description

Installing the vscode extension produces popups notifying that the language server crashed 5 times.
Lookingh at the logs, it seems like the java class java.lang.ClassNotFoundException: org.eclipse.lsp.cobol.LangServerBootstrap is not found

Steps to reproduce

  • Open code in wsl with code .
  • Install extension

Expected behavior

Extension should work

Screenshots

Language server crashes

Environment

Win10 with wsl (5.15.146.1-microsoft-standard-WSL2)

Additional information

@Fuzzyma Fuzzyma added the bug Something isn't working label May 28, 2024
@ishche
Copy link
Contributor

ishche commented May 29, 2024

Could you let me know how you installed the extension?

@Fuzzyma
Copy link
Author

Fuzzyma commented May 29, 2024

I used the vscode extension menu.
The first time if was installed, it was installed as a dependency of another cobol extension.
I also removed and reinstalled the extension multiple times. With no luck.

The vscode windows that I used was opened through "code ." in the wsl terminal. Afaik that means the vscode server runs on wsl whole the interface runs on windows (?)

@ishche
Copy link
Contributor

ishche commented May 29, 2024

Thank you for your response!

Could you please check the cobol ls extension in the %USERPROFILE%.vscode\extensions (~/.vscode/extensions in the case of Linux) folder? There should be broadcommfd.cobol-language-support-[vertsion]/server/jar folder. Please share the server.jar from there.

One more thing:
Please try to start the server in native mode. To do that, go to vscode settings and set the cobol-lsp.serverRuntime property to native.

The vscode windows that I used was opened through "code ." in the wsl terminal. Afaik that means the vscode server runs on wsl whole the interface runs on windows (?)

I'm not a Windows user, but I expect the JVM to run the server in the same environment as a node that runs vscode. I'm not sure that it can be related to the path. Otherwise, I would expect something like a jar not found exception.

@Fuzzyma
Copy link
Author

Fuzzyma commented May 29, 2024

So in windows, there is no such extension. I guess thats because I installed the extension on the linux side.
However, on linux, there is only a .vscode-server folder but that indeed contains the server.jar.
Since only zips are allowed, I uploaded it here.
server.zip

I tried the native mode already and that indeed works. What makes the whole thing a bit unusable for me is that "SCREEN SECTION" is not supported. Any chance to make that work?

@zimlu02
Copy link
Contributor

zimlu02 commented Jun 4, 2024

Hello,
Please join our Slack channel so we can meet to see your issue:
https://join.slack.com/t/che4z/shared_invite/zt-vlw321sg-2HuUaU0zI7fGIo2q7sEKZg

Alternatively, I can organize an online meeting with you using your email address.
Thank you,
Lukas

@VitGottwald
Copy link
Contributor

@Fuzzyma it looks like windows java is being executed under WSL which causes issues with paths. Could you, please, try installing java in your WSL environment and see if the issue persists?

@Fuzzyma
Copy link
Author

Fuzzyma commented Jun 10, 2024

As far as I can see, I have java installed on WSL as well:
grafik

The upper one is wsl, the below is windows

$ which java
/usr/bin/java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Triage
Development

No branches or pull requests

4 participants