[sonarlint-analysis-engine] ERROR sonarlint - ECJ: Unable to parse file

  • Operating system (Host): Microsoft Windows 10 Enterprise / Version 10.0.19045 Build 19045
  • WSL : Ubuntu 22.04.3 LTS / Release: 22.04
  • SonarLint plugin version: 10.9.0.79423
  • IntelliJ version: 2024.2.0.2 (Ultimate Edition)
  • Programming language you’re coding in: Java / JS
  • Is connected mode used: No (planning to use connected mode)

My cloned code and local server are in WSL, IntelliJ is able to read my code from the WSL, but for some reason, when I try to analyse an individual file, I receive the error below. For JavaScript files, I don’t get this error, but I don’t get any results.

[2024-09-24T12:20:31.099] [sonarlint-analysis-engine] ERROR sonarlint - ECJ: Unable to parse file
 [2024-09-24T12:20:31.1] [sonarlint-analysis-engine] ERROR sonarlint - Unable to parse source file : '[uri=file:////wsl$/Ubuntu/home/user-folder/projects/qwerty/repo/folder1/bin/custom/folder2/folder3/src/com/qqq/www/integrations/service/impl/QwertyIntegrationServiceImpl.java]'
 [2024-09-24T12:20:31.1] [sonarlint-analysis-engine] ERROR sonarlint - ECJ: Unable to parse file.

Also getting this message :

 [2024-09-24T14:37:35.501] [SonarLint Server RPC request executor] WARN sonarlint - Node.js could not be automatically detected, has to be configured manually in the SonarLint preferences!

image
image
image

Hi,

Welcome to the community!

Would you be comfortable sharing that file publicly? Privately?

 
Thx,
Ann

Hi, I could share it privately, but that’s happening for simple files as well, the files are in the WSL, so I feel it’s something related to that. Please, let me know how you want to move forward.

Hi,

Before we go down that road, we’ve just released 10.10. I don’t think it will solve this, but could you double-check, please?

 
Thx,
Ann

Hi Ann,

I have updated to the latest sonarlint for intellij and still having issues with my project. I have created a simple project with a java file and sonarlint worked fine. However, with my main project, which is a monolith code base (sap commerce-hybris), with java and web files, it doesn’t work, same error for Java files, and for JS I’m getting errors and exceptions.

My team is actually trying to evaluate SonarLint with the connected mode, but since it doesn’t work with an “offline” mode, we can’t move forward to the connected mode.

Please, let me know what else could I try, some settings or properties in IntelliJ specific to SonarLint or something like that.

Many Thanks!

Hi,

Thanks for checking. I’m going to flag this for the language team since this seems to be related specifically to Java files. Yes, I know you mentioned JS too, but I suspect we have multiple things going on here. So let’s start with Java & see where that gets us.

 
Ann

1 Like

Hey @brilliant-dolby, I apologize for asking again, but could you try again with the latest version, 10.11? We fixed some issues regarding the loading of Node.js in some specific scenarios.

I do not necessarily expect the issue to be fixed based on what you said, so could you also please share the SonarLint logs with us?

Thank you!

1 Like