You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
java: cannot find symbol symbol: class Generated location: package javax.annotation #4166
The error "java: cannot find symbol symbol: class Generated location: package javax.annotation" indicates that the Java compiler cannot locate the Generated class within the javax.annotation package. This typically occurs in projects that use code generation or annotations and are missing a required dependency or have an incorrect project setup.
Here are the common causes and solutions:
Missing javax.annotation-api dependency.
The Generated annotation is part of the javax.annotation-api library. If your project uses a build system like Maven or Gradle, you need to explicitly add this dependency.
Maven
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version> <!-- Or the appropriate version for your project -->
</dependency>
Gradle
dependencies {
implementation 'javax.annotation:javax.annotation-api:1.3.2' // Or the appropriate version
}
changed the title [-]java: package org.springframework.data.repository.reactive does not exist[/-][+]java: cannot find symbol symbol: class Generated location: package javax.annotation[/+]on Sep 22, 2025
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
Activity
[-]java: package org.springframework.data.repository.reactive does not exist[/-][+]java: cannot find symbol symbol: class Generated location: package javax.annotation[/+]fbricon commentedon Nov 12, 2025
Can you explain what you expect from vscode-java in this situation?
github-actions commentedon Dec 12, 2025
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.