Comments (7)
This might indeed be related to #5. Could you please paste the output stack trace if there is one? It should look similar to this:
from kotlin-language-server.
After showing few lines in output, a dialog shows:
from kotlin-language-server.
@suenfung That's unfortunate. Could you please paste the lines from the output? Which OS are you running on?
from kotlin-language-server.
@fwcd
OS:
macOS High Sierra Version 10.13.5
Output Log:
[INFO] main main Connected to client
[INFO] client main Adding workspace file:///Users/user_dummy/Documents/projects/project_dummy to source path
[INFO] client main Adding 242 files under /Users/user_dummy/Documents/projects/project_dummy to source path
[INFO] client main Searching for dependencies in workspace root /Users/user_dummy/Documents/projects/project_dummy
[SEVERE] client org.ec Internal error: java.lang.reflect.InvocationTargetException
lipse.
lsp4j.
jsonrp
c.Remo
teEndp
oint
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:63)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:116)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:257)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:186)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:188)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:90)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:61)
... 11 more
Caused by: kotlin.KotlinNullPointerException
at org.javacs.kt.classpath.FindClassPathKt.mvnCommand(findClassPath.kt:215)
at org.javacs.kt.classpath.FindClassPathKt.generateMavenDependencyList(findClassPath.kt:70)
at org.javacs.kt.classpath.FindClassPathKt.readPom(findClassPath.kt:55)
at org.javacs.kt.classpath.FindClassPathKt.readProjectFile(findClassPath.kt:41)
at org.javacs.kt.classpath.FindClassPathKt.findClassPath(findClassPath.kt:24)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:13)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:33)
at org.javacs.kt.KotlinLanguageServer.initialize(KotlinLanguageServer.kt:62)
... 16 more
[Error - 11:24:49 AM] Server initialization failed.
Message: Internal error.
Code: -32603
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:63)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:116)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:257)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:186)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:188)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:90)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:95)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:61)
... 11 more
Caused by: kotlin.KotlinNullPointerException
at org.javacs.kt.classpath.FindClassPathKt.mvnCommand(findClassPath.kt:215)
at org.javacs.kt.classpath.FindClassPathKt.generateMavenDependencyList(findClassPath.kt:70)
at org.javacs.kt.classpath.FindClassPathKt.readPom(findClassPath.kt:55)
at org.javacs.kt.classpath.FindClassPathKt.readProjectFile(findClassPath.kt:41)
at org.javacs.kt.classpath.FindClassPathKt.findClassPath(findClassPath.kt:24)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:13)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:33)
at org.javacs.kt.KotlinLanguageServer.initialize(KotlinLanguageServer.kt:62)
... 16 more
from kotlin-language-server.
@suenfung Thanks, this seems to be an issue with the classpath resolver. Do you have any pom.xml
files in your project, but not Maven installed (on your command line PATH)?
from kotlin-language-server.
I am seeing the same issue with a Gradle project (Spring Boot) that seems to unpack a pox.xml
in the top level build/
directory. I do not have Maven installed, and I think this file will add invalid dependencies anyway.
It seems that for my issue, a workaround is to run ./gradlew clean
before opening the project folder/workspace.
from kotlin-language-server.
I have the same issue, but I am using Visual Studio Code latest and I found the logs for the extension in my AppData directory structure (I'm on Windows):
`[Info - 1:51:13 p.m.] main Connected to client
[Info - 1:51:13 p.m.] client Adding workspace file:///c%3A/ws/roolz to source path
[Info - 1:51:13 p.m.] client Adding 57 files under c:\ws\roolz to source path
[Info - 1:51:13 p.m.] client Searching for dependencies in workspace root c:\ws\roolz
[Info - 1:51:13 p.m.] client Resolving dependencies for rlzactor through CLI...
[Info - 1:51:14 p.m.] client Creating temporary gradle file C:\Users\mkerr\AppData\Local\Temp\1\classpath9622557532420025474.gradle
[Info - 1:51:14 p.m.] client Found gradle.exe at C:\ProgramData\chocolatey\bin\gradle.exe
[Info - 1:51:20 p.m.] client Successfully resolved dependencies using Gradle dependencies CLI
[Info - 1:51:20 p.m.] client Resolving dependencies for rlzprotocol through CLI...
[Info - 1:51:20 p.m.] client Creating temporary gradle file C:\Users\mkerr\AppData\Local\Temp\1\classpath3687492058504834792.gradle
[Info - 1:51:20 p.m.] client Found gradle.exe at C:\ProgramData\chocolatey\bin\gradle.exe
[Info - 1:51:27 p.m.] client Successfully resolved dependencies using Gradle dependencies CLI
[Info - 1:51:28 p.m.] client Resolving dependencies for roolz through CLI...
[Info - 1:51:28 p.m.] client Creating temporary gradle file C:\Users\mkerr\AppData\Local\Temp\1\classpath12912053875673474220.gradle
[Info - 1:51:35 p.m.] client Successfully resolved dependencies using Gradle dependencies CLI
Jun. 06, 2019 1:51:35 P.M. org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: kotlin.KotlinNullPointerException
at org.javacs.kt.classpath.FindClassPathKt.mvnCommand(FindClassPath.kt:268)
at org.javacs.kt.classpath.FindClassPathKt.generateMavenDependencyList(FindClassPath.kt:123)
at org.javacs.kt.classpath.FindClassPathKt.readPom(FindClassPath.kt:108)
at org.javacs.kt.classpath.FindClassPathKt.readProjectFile(FindClassPath.kt:94)
at org.javacs.kt.classpath.FindClassPathKt.findClassPath(FindClassPath.kt:25)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:13)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:33)
at org.javacs.kt.KotlinLanguageServer.initialize(KotlinLanguageServer.kt:65)
... 16 more
[Error - 1:51:35 p.m.] client Internal error: java.lang.reflect.InvocationTargetException
[Error - 1:51:35 p.m.] Server initialization failed.
Message: Internal error.
Code: -32603
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: kotlin.KotlinNullPointerException
at org.javacs.kt.classpath.FindClassPathKt.mvnCommand(FindClassPath.kt:268)
at org.javacs.kt.classpath.FindClassPathKt.generateMavenDependencyList(FindClassPath.kt:123)
at org.javacs.kt.classpath.FindClassPathKt.readPom(FindClassPath.kt:108)
at org.javacs.kt.classpath.FindClassPathKt.readProjectFile(FindClassPath.kt:94)
at org.javacs.kt.classpath.FindClassPathKt.findClassPath(FindClassPath.kt:25)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:13)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:33)
at org.javacs.kt.KotlinLanguageServer.initialize(KotlinLanguageServer.kt:65)
... 16 more `
from kotlin-language-server.
Related Issues (20)
- Extend "Add missing import" code action to suggest "static methods"/functions
- C interoperability support? HOT 3
- Crash on windows
- Automatically generate "thank you" message for all contributors in release script
- Dependency module <dependencies of main> was not initialized by the time contents of dependent module <dependencies of main> were queried HOT 1
- Add code completion for labels
- JsonSyntaxException on startup HOT 7
- Re-add semantic tokens for string literals without covering up interpolations
- Support java 21 HOT 1
- Despite best efforts a sea of red in vscode: MISSING_BUILT_IN_DECLARATION HOT 1
- language server won`t start after update gradle from 8.5 to 8.6 HOT 2
- Neovim + Android + Mason: Unresolved references for certain android dependencies
- Support for multi-module project HOT 4
- Extension fails on Ubuntu devcontainer - couldn't create connection to server. HOT 3
- java.util.concurrent.TimeoutException: Unable to connect language server
- Feature - disable extension on per-file basis to mitigate `Unresolved reference:` errors HOT 2
- Suppress a warning around SLF4J HOT 3
- Too many error messages and exceptions. HOT 1
- bug: Rename variable fails
- LSP causes configuration caching to fail
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 kotlin-language-server.