Jakarta Inject API

The Jakarta Inject API provides standard annotations for dependency injection, used to simplify the injection of dependencies in Java applications.

Maven Dependency

<dependency>
  <groupId>jakarta.inject</groupId>
  <artifactId>jakarta.inject-api</artifactId>
  <version>1.0.5</version>
</dependency>

Version Compatibility and Requirements

VersionMinimum Java VersionCompatible Spring FrameworkCompatible Spring Boot
1.0.5Java 6Spring Framework 5.0+Spring Boot 2.0+
1.0.3Java 5Spring Framework 4.3+Spring Boot 1.5+

Common Java Classes

Known Vulnerabilities

VulnerabilityVersion AffectedFixed In
Potential Dependency Injection Vulnerability1.0.31.0.5

Common Errors and Troubleshooting

ErrorCauseFix
ClassNotFoundException: jakarta.inject.InjectThe `jakarta.inject-api` dependency is missing from the project.Add the following dependency in pom.xml:
<dependency>
  <groupId>jakarta.inject</groupId>
  <artifactId>jakarta.inject-api</artifactId>
  <version>1.0.5</version>
</dependency>
NoClassDefFoundError: jakarta/inject/InjectThe dependency is added but not correctly loaded, possibly due to a failed build.Run mvn clean install to rebuild and ensure dependencies are loaded.
IncompatibleClassChangeErrorAn incompatible version of `jakarta.inject-api` for the specified Java version is being used.Ensure that the `jakarta.inject-api` version matches the required Java version (e.g., version 1.0.5 requires Java 6 or higher).

Manifest File Information


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Jakarta Inject API
Bundle-SymbolicName: jakarta.inject-api
Bundle-Version: 1.0.5
Bundle-Description: Jakarta Inject API provides dependency injection annotations for Java applications.
Bundle-License: https://www.eclipse.org/legal/epl-2.0/
Export-Package: jakarta.inject;version="1.0.5"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=6))"
Bundle-Vendor: Eclipse Foundation
Automatic-Module-Name: jakarta.inject
Specification-Title: Jakarta Inject API
Specification-Version: 1.0
Specification-Vendor: Eclipse Foundation
Implementation-Title: jakarta.inject-api
Implementation-Version: 1.0.5
Implementation-Vendor: Eclipse Foundation

References

© 2024 MavenMQ.com. All Rights Reserved.     PrivacyPolicy      SiteMap      Facebook