Comments (10)
Stack trace from java-mode
's run-mode-hooks
Debugger entered--Lisp error: (wrong-type-argument lsp--workspace nil)
signal(wrong-type-argument (lsp--workspace nil))
lsp--set-configuration(((java (jdt (ls (vmargs . "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication"))) (errors (incompleteClasspath (severity . warning))) (configuration (updateBuildConfiguration . automatic) (maven)) (trace (server . off)) (import (gradle (enabled . t)) (maven (enabled . t)) (exclusions "**/node_modules/**" "**/.metadata/**" "**/archetype-resources/**" "**/META-INF/maven/**")) (referencesCodeLens (enabled . t)) (progressReports (enabled . t)) (signatureHelp (enabled . t)) (implementationsCodeLens (enabled . t)) (format (enabled . t) (settings (profile) (url)) (comments (enabled . :json-false))) (saveActions (organizeImports . t)) (contentProvider) (autobuild (enabled . t)) (completion (favoriteStaticMembers "org.junit.Assert.*" "org.junit.Assume.*" "org.junit.jupiter.api.Assertions.*" "org.junit.jupiter.api.Assumptions.*" "org.junit.jupiter.api.DynamicContainer.*" "org.junit.jupiter.api.DynamicTest.*") (importOrder "java" "javax" "com" "org")))))
lsp-java-update-user-settings()
lsp-java--after-start()
apply(lsp-java--after-start nil)
#f(advice-wrapper :after #f(compiled-function () (interactive nil) #<bytecode 0xdf16e9>) lsp-java--after-start)()
apply(#f(advice-wrapper :after #f(compiled-function () (interactive nil) #<bytecode 0xdf16e9>) lsp-java--after-start) nil)
lsp-java-enable()
run-hooks(change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook java-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook c-mode-common-hook java-mode-hook))
run-mode-hooks(java-mode-hook)
from lsp-java.
This error is usually caused by a failure in JDT process. There are several bugs on lsp-mode
side for better handling of process crash. Can you do the following:
- Check the content of
*lsp-java stderr*
- Make sure the jdt process is running
- To further diagnose the issue you could do
M-x
-eval-expression
and then type(lsp-java--ls-command)
which will generate the parameters that are used for starting LSP server.
from lsp-java.
Can you also remove : (add-hook 'prog-mode-hook 'lsp-mode)
from the following snippet too:
(use-package lsp-mode
:ensure t
:defer t
:init
(add-hook 'prog-mode-hook 'lsp-mode))```
from lsp-java.
I removed all hooks, restarted emacs, and tried to open a java file, did M-x lsp-mode
and M-x lsp-java-enable
, which resulted in the same error.
*lsp-java stderr*
:
Process lsp-java stderr finished
As far as I can tell, the jdt process is not running.
from lsp-java.
I ran the command given by (lsp-java--ls-command)
and it exits with error code 13. Deleting my workspace folder fixed this, but the error I opened this issue with still persists regardless of whether I have the jdt server running in a terminal or not.
from lsp-java.
Is the JDT server process running in process explorer?
from lsp-java.
The run in the terminal was just to diagnose the JDT issue. Can you kill the JDT that is running in the terminal, delete the workspace folder (just to make sure it is ok) and then restart emacs. Then after opening *.java you should check whether the JDT instance started by LSP java is up and running.
from lsp-java.
It does not run.
After doing this a couple of times, I've realized that this error shows up even before I run lsp-java-enable
:
From *Messages*
:
Lsp mode enabled in current buffer
Error during redisplay: (eval (lsp-mode-line)) signaled (wrong-type-argument lsp--workspace nil) [2 times]
from lsp-java.
Can you make sure you are not enabling lsp-mode
before lsp-enable-java
call?
from lsp-java.
Ha, it seems like that was it. I was under the impression that lsp-mode needs to be on before lsp-java-enable can be called, guess that was completely wrong.
from lsp-java.
Related Issues (20)
- Hangs in "Main thread is Waiting" in tree sitter mode (java-ts-mode) HOT 5
- Emacs company-mode doesn't work correctly HOT 16
- lsp-java not working with java-ts-mode HOT 1
- Have to start emacs with sudo, otherwise jdtls won't work HOT 3
- [Question] How to enable annotation processing
- `lsp-jt-run` not works
- Auto indent for empty line HOT 2
- (lsp-java--get-java-version) buggy
- Support for newest version of JDK 20, 21?
- test.java is not part of any project
- Is possible to get the oracle documentation of methods?
- support for netbeans lsp server HOT 1
- may not be accessible to clients due to missing ’requires transitive’, adding it breaks company-capf
- install jdtls but Non-readable POM HOT 1
- Gradle Tasks
- lsp-java-update-server is deprecated: update to README required
- vmArgs field in the launch.json file is not parsed or used. HOT 2
- lsp-java-server-install-dir variable does not seem to work HOT 2
- Lombok support does not work
- Null annotation types config? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-java.