redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.07k stars 433 forks source link

ISSUE: Language Support for Java doesn't work properly, it shows unnecessary error underlines #3667

Closed ihssmaheel-dev closed 3 months ago

ihssmaheel-dev commented 3 months ago

When opening a Java Spring Boot project in Visual Studio Code, unnecessary error underlines are displayed, despite the code being correct.

Environment
Steps To Reproduce
  1. Open Vscode
  2. Open any java spring boot project

cannot find symbol\n symbol: variable log\n

[Please attach a sample project reproducing the error] Please attach logs

Current Result

Unnecessary error underlines are shown in the code, indicating errors where there are none.

Expected Result

The code should be correctly analyzed, and only real errors should be underlined.

Additional Informations

Language support for Java - Log Jun 04, 2024 4:15:57 PM org.apache.aries.spifly.BaseActivator log INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic Jun 04, 2024 4:15:57 PM org.apache.aries.spifly.BaseActivator log INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic Jun 04, 2024 4:16:08 PM com.microsoft.java.debug.plugin.internal.JavaDebuggerServerPlugin start INFO: Starting com.microsoft.java.debug.plugin Jun 04, 2024 4:16:12 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 4 Jun 04, 2024 4:16:12 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 5 Jun 04, 2024 4:16:59 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation WARNING: Unmatched cancel notification for request id 45 Jun 04, 2024 4:21:19 PM com.microsoft.java.debug.core.UsageDataSession recordInfo INFO: launch debug info Jun 04, 2024 4:21:22 PM com.microsoft.java.debug.core.UsageDataSession recordResponse WARNING: abnormal response

fbricon commented 3 months ago

In the initial screenshot you published, the error that was shown was not coming from vscode-java, but likely from another Java extension you installed. I suggest you disable all other vscode extensions but the vscode-java one to figure it out

ihssmaheel-dev commented 3 months ago

vscode-java means Language support for java right ?

Screenshot 2024-06-05 095133

ihssmaheel-dev commented 3 months ago

It is working fine now. I suspect the issue may be related to the 'Java Language Support' extension by George Fraser.