Sonar scan is returning ECJ: Unable to parse file error

I have an application which is running fine with java 17.
when i am scanning through sonar i am getting below error.

[e[1;31mERRORe[m] ECJ: Unable to parse file
14:44:03  java.nio.file.FileSystemNotFoundException: /usr/lib/jvm/java-17-openjdk/modules
14:44:03  	at jdk.internal.jrtfs.SystemImage.open(SystemImage.java:78)
14:44:03  	at jdk.internal.jrtfs.JrtFileSystem.<init>(JrtFileSystem.java:90)
14:44:03  	at jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:109)
14:44:03  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:128)
14:44:03  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:107)
14:44:03  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:339)
14:44:04  [mvn-builder-gmd-data-service-parent] [e[1;31mERRORe[m] Unable to parse source file : 'service/src/main/java/com/abc/gmd/controllers/RegionEntityController.java'
14:44:04  [mvn-builder-gss-data-service-parent] [e[1;31mERRORe[m] ECJ: Unable to parse file.
14:44:04  [mvn-builder-gss-data-service-parent] [e[1;31mERRORe[m] ECJ: Unable to parse file
14:44:04  java.nio.file.FileSystemNotFoundException: /usr/lib/jvm/java-17-openjdk/modules
14:44:04  	at jdk.internal.jrtfs.SystemImage.open(SystemImage.java:78)
14:44:04  	at jdk.internal.jrtfs.JrtFileSystem.<init>(JrtFileSystem.java:90)
14:44:04  	at jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:109)
14:44:04  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:128)
14:44:04  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:107)
14:44:04  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:339)
14:44:04  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:288)
14:44:04  	at org.eclipse.jdt.internal.compiler.util.JrtFileSystem.initialize(JRTUtil.java:381)
14:44:04  	at org.eclipse.jdt.internal.compiler.util.JrtFileSystem.<init>(JRTUtil.java:357)

RegionEntityController is just a rest controller.

Please assist me if something we can do to fix these errors.

Regards,
AJ

Hi AJ,

Can you provide the full analysis log, and a reproducer file?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

I have an application which is running fine with java 17.
when i am scanning through sonar i am getting below error.

[e[1;31mERRORe[m] ECJ: Unable to parse file
14:44:03  java.nio.file.FileSystemNotFoundException: /usr/lib/jvm/java-17-openjdk/modules
14:44:03  	at jdk.internal.jrtfs.SystemImage.open(SystemImage.java:78)
14:44:03  	at jdk.internal.jrtfs.JrtFileSystem.<init>(JrtFileSystem.java:90)
14:44:03  	at jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:109)
14:44:03  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:128)
14:44:03  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:107)
14:44:03  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:339)
14:44:04  [mvn-builder-gmd-data-service-parent] [e[1;31mERRORe[m] Unable to parse source file : 'service/src/main/java/com/abc/gmd/controllers/RegionEntityController.java'
14:44:04  [mvn-builder-gmd-data-service-parent] [e[1;31mERRORe[m] ECJ: Unable to parse file.
14:44:04  [mvn-builder-gmd-data-service-parent] [e[1;31mERRORe[m] ECJ: Unable to parse file
14:44:04  java.nio.file.FileSystemNotFoundException: /usr/lib/jvm/java-17-openjdk/modules
14:44:04  	at jdk.internal.jrtfs.SystemImage.open(SystemImage.java:78)
14:44:04  	at jdk.internal.jrtfs.JrtFileSystem.<init>(JrtFileSystem.java:90)
14:44:04  	at jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:109)
14:44:04  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:128)
14:44:04  	at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newFileSystem(JrtFileSystemProvider.java:107)
14:44:04  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:339)
14:44:04  	at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:288)
14:44:04  	at org.eclipse.jdt.internal.compiler.util.JrtFileSystem.initialize(JRTUtil.java:381)
14:44:04  	at org.eclipse.jdt.internal.compiler.util.JrtFileSystem.<init>(JRTUtil.java:357)

RegionEntityController is just a rest controller.

Please assist me if something we can do to fix these errors.

Regards,
AJ

Hi AJ,

It looks like when your first topic didn’t get an immediate reply, you created a second, almost identical one? Please don’t do that. Per the FAQ, it may take some time to get a response.

I’ve combined your topics here.

 
Ann