Closed tschaffter closed 1 month ago
I should actually look at the log of the Language support for Java (Syntax Server)
. For a file of the challenge service:
WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
[Error - 8:44:09 PM] Nov 7, 2023, 8:44:09 PM [Working copy] ChallengeServiceApplication.java [in org.sagebionetworks.openchallenges.challenge.service [in src [in jdt.ls-java-project]]] does not exist
[Working copy] ChallengeServiceApplication.java [in org.sagebionetworks.openchallenges.challenge.service [in src [in jdt.ls-java-project]]] does not exist
Java Model Exception: Error in Java Model (code 969): [Working copy] ChallengeServiceApplication.java [in org.sagebionetworks.openchallenges.challenge.service [in src [in jdt.ls-java-project]]] does not exist
at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:550)
at org.eclipse.jdt.internal.core.Openable.getUnderlyingResource(Openable.java:358)
at org.eclipse.jdt.internal.core.CompilationUnit.getUnderlyingResource(CompilationUnit.java:986)
at org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.collectNonJavaProblems(BaseDiagnosticsHandler.java:149)
at org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.endReporting(BaseDiagnosticsHandler.java:135)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.reportProblems(ReconcileWorkingCopyOperation.java:148)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:112)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:740)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:806)
at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1325)
at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:325)
at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:288)
at org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler$PublishDiagnosticJob.run(BaseDocumentLifeCycleHandler.java:734)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
EDIT: It's actually the Language support for Java
process that shows logs when highlighting Java elements.
ImageServiceApplication.java is a non-project file, only syntax errors are reportedJava(16)
I got the same warning simply because I had two Java (Maven) projects in the same Visual Studio Code workspace.
That may be why.
In VS Code, run "Java: Clean the Java language server workspace"
This did not work.
The Language Support for Java thrown the following errors when saving a Java file:
Caused by: java.lang.IllegalStateException: 243:44: mismatched input '(' expecting ';'
at com.puppycrawl.tools.checkstyle.JavaParser$CheckstyleErrorListener.syntaxError(JavaParser.java:255)
at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:543)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139)
at com.puppycrawl.tools.checkstyle.CheckstyleParserErrorStrategy.recoverInline(CheckstyleParserErrorStrategy.java:38)
at org.antlr.v4.runtime.Parser.match(Parser.java:207)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.blockStatement(JavaLanguageParser.java:6092)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.block(JavaLanguageParser.java:6007)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.methodBody(JavaLanguageParser.java:2897)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.methodDeclaration(JavaLanguageParser.java:2856)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.memberDeclaration(JavaLanguageParser.java:2704)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.classBodyDeclaration(JavaLanguageParser.java:2631)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.classBody(JavaLanguageParser.java:2442)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.classDeclaration(JavaLanguageParser.java:1084)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.types(JavaLanguageParser.java:744)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.typeDeclaration(JavaLanguageParser.java:659)
at com.puppycrawl.tools.checkstyle.grammar.java.JavaLanguageParser.compilationUnit(JavaLanguageParser.java:411)
at com.puppycrawl.tools.checkstyle.JavaParser.parse(JavaParser.java:99)
... 23 more
Caused by: org.antlr.v4.runtime.InputMismatchException
... 37 more
Added to Backlog
This has no longer been an issue recently.
Is there an existing issue for this?
What product(s) are you seeing the problem on?
OpenChallenges
Current behavior
The Language server for Java in VS Code fails to start. This results in Intellisense not being available to Java files.
Language server logs:
Expected behavior
No response
Anything else?
No response
Commit ID
4addaa2ad44084f6b69ee6628d2f0efeca621005
Are you developing inside the dev container?
Code of Conduct