[BUG] Java Model Exception: Error in Java Model (code 969)

Please provide

  • Operating system:
    Windows 11
  • SonarLint plugin version:
    9.2.0.81471
  • Programming language you’re coding in:
    Java
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):
      SonarQube

And a thorough description of the problem / question:
I moved a folder into another part of the project and now I’m seeing this exception every so often:

aap-to-sis-json-lib does not exist
Java Model Exception: Error in Java Model (code 969): aap-to-sis-json-lib does not exist
	at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:549)
	at org.eclipse.jdt.internal.core.JavaModelManager.getPerProjectInfoCheckExistence(JavaModelManager.java:2576)
	at org.eclipse.jdt.internal.core.JavaProject.getPerProjectInfo(JavaProject.java:2438)
	at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2536)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.addClassPathToSonarProject(JdtUtils.java:127)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.processProjectEntry(JdtUtils.java:252)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.addClassPathToSonarProject(JdtUtils.java:137)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.processProjectEntry(JdtUtils.java:252)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.addClassPathToSonarProject(JdtUtils.java:137)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.configureJavaProject(JdtUtils.java:108)
	at org.sonarlint.eclipse.jdt.internal.JdtUtils.configure(JdtUtils.java:54)
	at org.sonarlint.eclipse.jdt.internal.JavaProjectConfiguratorExtension.configure(JavaProjectConfiguratorExtension.java:88)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.configure(AbstractAnalyzeProjectJob.java:312)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:159)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarJob.run(AbstractSonarJob.java:37)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hi @gnl42,

thank you for raising this issue. Sorry, it took so long due to the Holiday season.

Could you please elaborate on what aap-to-sis-json-lib is? The issue occurred as the classpath of the project of the file you were analyzing seemed to be corrupted.

Was the folder part of the sources or did it contain any classpath objects (like other projects, library dependencies, or something like this)?
With this information I can further check if we can circumvent SonarLint from throwing issues whenever you move something and the classpath might be incorrect for a short amount of time.

Best,
Tobias