-
Notifications
You must be signed in to change notification settings - Fork 401
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
Java Model Exception: Error in Java Model (code 969): src/main/.... [in app] does not exist #3181
Comments
It's probably a separate issue from #3046. Java model errors are a general type of error. Are you able to share your project ? Do you know what version of JDT-LS is being used with the client ? |
Unfortunately it's a private code base. jdtls is v1.35.0. |
I think you're running a nightly version of JDT-LS. The version of gradle referenced is https://www.eclipse.org/downloads/download.php?file=/jdtls/snapshots/jdt-language-server-1.37.0-202406071833.tar.gz does contain the following metadata in the language server under
I'm not sure why it attempted to fetch that instead of using the wrapper that's listed in the project, but it could be an issue in validating the gradle wrapper. We do check that the version of Gradle listed matches exactly the checksum of the proper released version. It might be worth trying JDT-LS 1.36 or something else just to see if that works. |
That's weird. I've installed jdtls via mason-nvim. It clearly references the 1.35 download as can be seen in it's registry file here: |
Have a look from #2898 (comment) and below . Very similar issue. I had the user report the output of |
Here's the output of 640632 org.gradle.launcher.daemon.bootstrap.GradleDaemon -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -javaagent:/home/mike/.gradle/wrapper/dists/gradle-8.6-bin/afr5mpiioh2wthjmwnkmdsd5w/gradle-8.6/lib/agents/gradle-instrumentation-agent-8.6.jar |
I've now also tried with 1.36 and still get the same errors:
|
Having checked how the checksums are verified, I don't think the download failure is harmful. With that said, could you check for the presence of |
I removed the content from that directory and now the gradle error is really gone, thanks. But the main problem is still there:
|
I have the same problem and can reproduce this issue using https://github.com/eclipse-jdtls/eclipse.jdt.ls/tree/master/org.eclipse.jdt.ls.tests/projects/gradle/android My environment: jdtls: jdt-language-server-1.37.0-202406130424.tar.gz Here is my initialization configuration: {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":22897,"clientInfo":{"name":"Eglot","version":"1.17"},"rootPath":"/home/archer/workspace/test/android/","rootUri":"file:///home/archer/workspace/test/android","initializationOptions":{"settings":{"java.jdt.ls.androidSupport.enabled":true,"java.imports.gradle.wrapper.checksums":[{"sha256":"504b38a11c466aecb2f5c0b0d8ce0ed7ffa810bf70b9b7a599c570051be8fb4e","allowed":true}]},"extendedClientCapabilities":{"classFileContentsSupport":true}},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/archer/workspace/test/android","name":"~/workspace/test/android/"}]}} |
Have you set |
I've added that setting now but no difference. Still see that exception in jdt.ls logs and the LSP does not work properly. |
I had similar errors in other (non-android) projects (
Calling So I tried the same for this android project. The So the error remains. |
I try to work on a foreign Android project in neovim + nvim-jdtls and get unexpected errors in this form when eclipse.jdt.ls starts:
Java Model Exception: Error in Java Model (code 969): src/main/java/com/xxxxxlog/app/domain/ihm [in app] does not exist
But that path exists and contains class files.
Full log output:
Sidenote: That other error (Cannot download Gradle sha256 checksum) seems to not be a problem. I also have it on another project but the LSP features work fine there. I just don't get why it tries to fetch the checksum for gradle 8.9 because the project uses gradle 8.6. There's no 8.9 configured anywhere.
The text was updated successfully, but these errors were encountered: