-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
jakarta.inject support #1383
Comments
That's not a small undertaking - whole library sprinkled with java.inject namespace. Thinking about it - would an acceptable solution to have 2 libraries - guice-javax and guice-jakarta , and make them coexists somehow? (thinking out loud) |
You can use the guiced-ee artifact for jakarta namespacing across the board https://mvnrepository.com/artifact/com.guicedee.services/guice |
Are there any plans to look into support for this? |
I would be willing to contribute, maybe even with a small team. |
Guice's greatest virtue is its agility and that it is a DI library by itself with no frills added. Other DI and CDI solutions are fullstack If you want to use more modern application servers ( or other solutiones....) , on many occasions are forced to do a full stack migration. In itself a migration to , for example, toSpring, Micronaut, Quarkus is a full stack migration generating complicated dependencies that can condition the evolution of the applications..... Indirectly, not supporting this small functionality is forcing developers to do full stack migrations and it's not easy to get out of there! Reconsider! |
We need this. |
Bump on this, still not resolved. Is there any workaround? |
I did an automatic repackage of guice 5.1.0 (with tomcat migration tool) and published it yesterday into maven central (as rc.1 for now). Repackaged version use jakarta.inject, jakarta.servlet and jakarta.persistence. Conversion performed on source jars (loaded from maven central) which are compiled then, so sources and javadoc are aligned in maven central publication. Pom and manifest files were manually rebuild (to replace dependencies and fix OSGI declarations). Struts2 and spring modules are not included (I doubt someone needs it). Those who interesterested, please help me test it. About 3rd party libraries: there would, of course, be problems with 3rd party libraies using javax.inject annotations: migrated guice would not see these annotations causing errors (e.g. not found constructor because of wrong annotation). In my libs I simply replaced all javax.inject.Inject annotations with gucie native annotations (so it could work with both javax and jakarta guice versions). |
FYI all, I'm going to take some time early next week to fix this for core Guice. I am still against outright forking the servlet extension into the jakarta namespace though, and will gladly welcome (and encourage) any community members that want to fork the servlet extension, fix its warts, and become the "official owners" of it. |
Hi folks -- I have some changes prepared to support this for core Guice. However, the Dagger folks mentioned that they were informed of some issues related to supporting both javax.inject & jakarta.inject at the same time -- see google/dagger#2058 (comment). The TL;DR as best I can make out is:
How much of an issue is this for folks? My plan is basically to keep the I'm open to ideas from folks more familiar with Maven about how to handle this. (@mcculls FYI) |
Why attempt to support both namespaces simultaneously, as opposed to just declaring Guice version X.Y.Z only supports the |
@norrisjeremy -- For one, Google has quite literally millions of files referencing One possibility here is to introduce a separate published artifact with a |
On Tue, 25 Apr 2023 at 17:39, Sam Berlin ***@***.***> wrote:
@norrisjeremy <https://github.com/norrisjeremy> -- For one, Google has
quite literally millions of files referencing javax.inject. It isn't
feasible to just up and say "switch'm all to another package". I wouldn't
want to demand that from any other users either. Even if a migration were
to happen, it would need to be incremental -- we can't just say "switch
your entire codebase in order to use the new version".
Old apps can still use the current/old version of Guice.
When an app is ready to switch to Jakarta it will bump to the new version
of Guice that is based on Jakarta-inject 2.0.1
I guess you don’t want to maintain two major versions of Guice. But
supporting both Javax and Jakarta simultaneously would be more work in my
opinion.
… One possibility here is to introduce a separate published artifact with a
-jpms-compat suffix, and that artifact could potentially shade the
javax.inject references. A naive shade would produce some awkward APIs,
where Binder (for example) would have toProvider(Class<? extends
shaded.javax.inject.Provider) API. (The toProvider methods in Binder are
also a problem in general for supporting jakarta.inject, so maybe there's
another solution that could deal with those too.)
—
Reply to this email directly, view it on GitHub
<#1383 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABYUQWSTSWXKEGYKE6O4YTXC7O23ANCNFSM4QGL6RWQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If I were able to cajole folks into a new release of javax.inject (at the javax.inject maven coordinates) that included a module name, etc.. would that make these problems go away? |
Thanks for giving it a spin, @cdietrich, and glad to hear the regression was just a mistaken javax import. All: I posted release notes & made a proper announcement post @ #1732. Please follow up there with your success or failure stories in adopting Guice 6.0 or 7.0. Thank you! |
6.0.0-rc2 works with the Play Framework and we do have quite some testing going on. I didn't change anything besides bumping the guice version (keep using javax.inject):
7.0.0-rc1 works as well also, switched everything to the jakarta namespace: playframework/playframework#11792 |
We will be shipping support for both javax.inject (guice 5.x-6.x) and jakarta.inject (guice 7.x) in the next release of https://github.com/jdbi/jdbi. Testing looks good; ideally we could use the releases as base lines; everything works so far with the release candidates. |
RestEasy dropped support for Guice when they migrated to Jakarta. That used to be the more popular JAX-RS framework to use with Guice since Jersey 2 had buggy integration due lifecycle clashes with HK2. I'm hoping they'll restore this module (RESTEASY-3329). |
@ben-manes they also dropped any future support for any modules in their entirety - by separating out the spi's, Rest Easy is not compatible with modular development, Guice is a modular DI. |
Thanks all, this is great to hear that things are working in your environments. If it's possible to continue the discussion on the release announcement @ #1732, it's a little easier to keep track of the one discussion post instead of comments inside a closed issue. |
Guice 6.x release is adding support for jakarta.inject, see this issue for more details: [1]. Guice release 7.0.0 will remove support for javax.inject annotation and only support jakarta.inject. Also add new dependency to jakarta.inject library. [1] google/guice#1383 Release-Notes: Update guice version to 6.0.0 Change-Id: I0eb5320289bde532ac57bdd376802b37c1cee47f
…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
…grade wiremock as part of spring boot 3.x upgrade While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors: ``` 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 ``` javax/servlet/DispatcherType java.lang.NoClassDefFoundError: javax/servlet/DispatcherType at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31) at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:74) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$Fixture.<init>(Ok3HttpClientIntegrationTest.kt:78) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at dev.minutest.TestContextBuilder$fixture$1.invoke(ContextBuilder.kt:48) ``` In order to fix this issue, upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3
…grade wiremock as part of spring boot 3.x upgrade While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors: ``` 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 ``` javax/servlet/DispatcherType java.lang.NoClassDefFoundError: javax/servlet/DispatcherType at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31) at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:74) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$Fixture.<init>(Ok3HttpClientIntegrationTest.kt:78) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at dev.minutest.TestContextBuilder$fixture$1.invoke(ContextBuilder.kt:48) ``` In order to fix this issue, upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3
…grade wiremock as part of spring boot 3.x upgrade While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors: ``` 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 ``` javax/servlet/DispatcherType java.lang.NoClassDefFoundError: javax/servlet/DispatcherType at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31) at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:74) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$Fixture.<init>(Ok3HttpClientIntegrationTest.kt:78) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at dev.minutest.TestContextBuilder$fixture$1.invoke(ContextBuilder.kt:48) ``` In order to fix this issue, upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3
… cloud from 2021.0.x to 2022.0.x Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5. Spring cloud release 2022.0.x is compatible with spring boot 3.0.x. https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases ====================================================== refactor(dependency): replace javax with jakarta, javax.inject with jakarta.inject, rxjava with rxjava3 and add resilience4j-vavr during upgrade of spring boot 3.0.x Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades So, replacing the imports with `javax` to `jakarta`. Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava `io.vavr` dependency has been removed from resilience4j:2.0.2. https://github.com/resilience4j/resilience4j/releases/tag/v2.0.0 Resilience4j comes as transitive dependency of spring-cloud-dependencies. https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies/2022.0.5 So, adding explicit dependency of `resilience4j-vavr` `javax.inject` that has been moved from present coordinate to `jakarta.inject`. So, updating the coordinates in igor-web module. google/guice#1463 google/guice#1383 https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject
… cloud from 2021.0.x to 2022.0.x Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5. Spring cloud release 2022.0.x is compatible with spring boot 3.0.x. https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases `WebMvcConfigurerAdapter` class has been deprecated in Springframework 5.0 and subsequently removed from Springframework 6.0. So, replacing it with `WebMvcConfigurer` interface for direct implementation. https://docs.spring.io/spring-framework/docs/5.0.0.RELEASE/javadoc-api/org/springframework/web/servlet/config/annotation/WebMvcConfigurerAdapter.html =============================================================================================== refactor(dependency): replace javax with jakarta and javax.inject with jakarta.inject during upgrade of spring boot 3.0.x Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades So, replacing the imports with `javax` to `jakarta`. `javax.inject` that has been moved from present coordinate to `jakarta.inject`. So, updating the coordinates in igor-web module. google/guice#1463 google/guice#1383 https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject =============================================================================================== refactor(jedis): migrate jedis from 3.x to 4.x during upgrade of spring boot 3.0.x Spring boot upgrade from 2.7.18 to 3.0.13, upgrades `redis.clients:jedis` from 3.8.0 to 4.3.2. So, migrating jedis from 3.x to 4.x by following the migration [document](https://github.com/redis/jedis/blob/master/docs/3to4.md) And for further changelogs, please refer [here](https://github.com/redis/jedis/releases/tag/v4.0.0) =============================================================================================== refactor(dependency): migrate rxjava to rxjava3 during upgrade of spring boot 3.0.x Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava And refactored the code to accomodate changes required by rxjava2 and rxjava3 following the changelogs. https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0 https://github.com/ReactiveX/RxJava/wiki/What%27s-different-in-3.0 =============================================================================================== refactor(dependency): add explicit resilience4j-vavr dependency with spring boot upgrade to 3.x `io.vavr` dependency has been removed from resilience4j:2.0.2. https://github.com/resilience4j/resilience4j/releases/tag/v2.0.0 Resilience4j comes as transitive dependency of spring-cloud-dependencies. https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies/2022.0.5 So, adding explicit dependency of `resilience4j-vavr` As part of removing vavr dependency, resilience4j has made change that returns a Set instead of Seq when retryRegistry.getAllRetries() is called. Link: https://github.com/resilience4j/resilience4j/pull/1121/files#diff-f58a549005afee4cef1bdce1c1a5571f40fcede02013722f6bd05d221bde56eeR153 resilience4j/resilience4j#1537
…grade wiremock as part of spring boot 3.x upgrade While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors: ``` 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 ``` javax/servlet/DispatcherType java.lang.NoClassDefFoundError: javax/servlet/DispatcherType at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31) at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:74) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$Fixture.<init>(Ok3HttpClientIntegrationTest.kt:78) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at dev.minutest.TestContextBuilder$fixture$1.invoke(ContextBuilder.kt:48) ``` In order to fix this issue, upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3
…grade wiremock as part of spring boot 3.x upgrade While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below errors: ``` 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 ``` javax/servlet/DispatcherType java.lang.NoClassDefFoundError: javax/servlet/DispatcherType at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31) at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:74) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$Fixture.<init>(Ok3HttpClientIntegrationTest.kt:78) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at com.netflix.spinnaker.kork.plugins.sdk.httpclient.Ok3HttpClientIntegrationTest$test$1$1.invoke(Ok3HttpClientIntegrationTest.kt:40) at dev.minutest.TestContextBuilder$fixture$1.invoke(ContextBuilder.kt:48) ``` In order to fix this issue, upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3
… cloud from 2021.0.x to 2022.0.x Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5. Spring cloud release 2022.0.x is compatible with spring boot 3.0.x. https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases =============================================================================================== refactor(dependency): replace javax with jakarta and javax.inject with jakarta.inject during upgrade of spring boot 3.0.x Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades So, replacing the imports with `javax` to `jakarta`. `javax.inject` that has been moved from present coordinate to `jakarta.inject`. So, updating the coordinates in igor-web module. google/guice#1463 google/guice#1383 https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject =============================================================================================== refactor(dependency): migrate rxjava to rxjava3 during upgrade of spring boot 3.0.x Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava And refactored the code to accomodate changes required by rxjava2 and rxjava3 following the changelogs. https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0 https://github.com/ReactiveX/RxJava/wiki/What%27s-different-in-3.0 =============================================================================================== refactor(dependency): upgrade wiremock as part of spring boot 3.x and spring cloud 2022.0.x upgrade Upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3 3. Change Artifact IDs of wiremock-jre8 and wiremock-jre8-standalone to wiremock and wiremock-standalone =============================================================================================== refactor(dependency): upgrade greenmail as part of spring boot 3.x and spring cloud 2022.0.x upgrade Greenmail dependency is used for email notifications in echo. Greenmail 1.5.14 is based on javax.mail package. With spring boot 3.x upgrade javax.mail package has been replaced with jakarta.mail, so, upgrading the greenmail to 2.0.1 which is based on jakarta.mail package. https://github.com/greenmail-mail-test/greenmail/releases/tag/release-2.0.1
… cloud from 2021.0.x to 2022.0.x Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5. Spring cloud release 2022.0.x is compatible with spring boot 3.0.x. https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases =============================================================================================== refactor(dependency): replace javax with jakarta and javax.inject with jakarta.inject during upgrade of spring boot 3.0.x Spring Boot 3.0 has migrated from Java EE to Jakarta EE APIs for all dependencies. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes#third-party-library-upgrades So, replacing the imports with `javax` to `jakarta`. `javax.inject` that has been moved from present coordinate to `jakarta.inject`. So, updating the coordinates in igor-web module. google/guice#1463 google/guice#1383 https://docs.openrewrite.org/recipes/java/migrate/jakarta/javaxinjectmigrationtojakartainject =============================================================================================== refactor(dependency): migrate rxjava to rxjava3 during upgrade of spring boot 3.0.x Spring boot 3.x deprecated and removed rxjava, and rxjava3 has been added. So, update the dependency. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#rxjava And refactored the code to accomodate changes required by rxjava2 and rxjava3 following the changelogs. https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0 https://github.com/ReactiveX/RxJava/wiki/What%27s-different-in-3.0 =============================================================================================== refactor(dependency): upgrade wiremock as part of spring boot 3.x and spring cloud 2022.0.x upgrade Upgrading wiremock dependency to 3.0.4 and updating its coordinates. Wiremock [3.0.0](https://github.com/wiremock/wiremock/releases/tag/3.0.0) onwards 2 major breaking changes are introduced: 1. support for Java 17, dropping Java 8 support 2. Change the Maven repository groupID to org.wiremock https://github.com/wiremock/wiremock/releases?page=3 3. Change Artifact IDs of wiremock-jre8 and wiremock-jre8-standalone to wiremock and wiremock-standalone =============================================================================================== refactor(dependency): upgrade greenmail as part of spring boot 3.x and spring cloud 2022.0.x upgrade Greenmail dependency is used for email notifications in echo. Greenmail 1.5.14 is based on javax.mail package. With spring boot 3.x upgrade javax.mail package has been replaced with jakarta.mail, so, upgrading the greenmail to 2.0.1 which is based on jakarta.mail package. https://github.com/greenmail-mail-test/greenmail/releases/tag/release-2.0.1
Jakarta is coming to cause headaches for all :)
It would be nice if Guice could support processing Jakarta inject annotations as well as javax inject annotations. That would prevent us from potentially having to write a cross injection system constructor like
@Inject
@jakarta.inject.Inject
Fortunately, they don't share a package and it looks like jakarta pretty much only changed the package name.
The text was updated successfully, but these errors were encountered: