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

Module java.sql not found #247

Open
mvsrgc opened this issue Apr 14, 2023 · 6 comments
Open

Module java.sql not found #247

mvsrgc opened this issue Apr 14, 2023 · 6 comments

Comments

@mvsrgc
Copy link

mvsrgc commented Apr 14, 2023

I tried to install this language server using Mason with JDK 19. When I did this the link_linux.sh script failed with "module java.sql not found". I upgraded to JDK 20 and that fixed the problem.

https://www.oracle.com/java/technologies/javase/jdk20-archive-downloads.html

@chkhetiani
Copy link

Same problem happening for me but for JDK17

@kalif76
Copy link

kalif76 commented Apr 24, 2023

Getting the same problem with OpenJDK 17 and OpenJDK 20, this is the error:

 Failed
    ◍ java-language-server
      ▼ Displaying full log
        Cloning into '.'...
        From https://github.com/georgewfraser/java-language-server
         * tag               v0.2.39    -> FETCH_HEAD
        + ./scripts/link_linux.sh
        Error: Module java.sql not found
        java.lang.module.FindException: Module java.sql not found
        	at java.base/java.lang.module.Resolver.findFail(Resolver.java:893)
        	at java.base/java.lang.module.Resolver.resolve(Resolver.java:129)
        	at java.base/java.lang.module.Configuration.resolve(Configuration.java:421)
        	at java.base/java.lang.module.Configuration.resolve(Configuration.java:255)
        	at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:217)
        	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:536)
        	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:424)
        	at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
        	at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
        	at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:33)
        spawn: bash failed with exit code 1 and signal 0. 

but the module seems to be there:

java --list-modules | grep java.sql@

java.sql@17.0.6

@IcePanorama
Copy link

I'm running the latest (java 20) and getting the same error.

@friedelschoen
Copy link

You have to install e.g. openjdk17-jmods (on Void Linux) or search for similar Java Modules package on your distribution.

@MiranDaniel
Copy link

MiranDaniel commented Sep 3, 2023

Can confirm installing jmods fixes the issue with JDK 20 as well.

@jazerix
Copy link

jazerix commented May 21, 2024

Can also confirm on Fedora 39, installing java-17-openjdk-jmods fixed the 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

7 participants