Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dependency): replace javax.inject with jakarta.inject and javax with jakarta #1217

Closed
wants to merge 1 commit into from

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Dec 12, 2024

Replacing javax.inject with jakarta.inject, as moving forward the new coordinates will house the feature development and upgrades. So, updating the coordinates in kork-eureka, kork-plugins and kork-web modules.
google/guice#1463
google/guice#1383
https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject

…f spring boot 3.x upgrade

While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below error:
```
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.inject.Provider<com.netflix.spectator.api.Registry>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1824)
	at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1383)
	at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
	at app//org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:910)
	at app//org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
	... 175 more
```
The root cause is use of `javax.inject` that has been moved from present coordinate to `jakarta.inject`. So, updating the coordinates in kork-eureka, kork-plugins and kork-web modules.
google/guice#1463
google/guice#1383
https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject
@j-sandy j-sandy changed the title chore(dependency): replace javax.inject with jakarta.inject as part of spring boot 3.x upgrade chore(dependency): replace javax.inject with jakarta.inject Dec 18, 2024
@j-sandy j-sandy changed the title chore(dependency): replace javax.inject with jakarta.inject chore(dependency): replace javax.inject with jakarta.inject and javax with jakarta Dec 18, 2024
@j-sandy j-sandy closed this Dec 18, 2024
@j-sandy
Copy link
Contributor Author

j-sandy commented Dec 18, 2024

Going to add this change in Spring boot 3.0.x upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant