v4.0.0 #6931
Replies: 6 comments 9 replies
-
I just upgraded 2 projects from 2.0.x and 2.1.x to 4.0.0. The migration was a breeze, no problems at all. Note: If you are using the dependency "swagger-jaxrs2", use the artifact "swagger-jaxrs2-jakarta" instead. |
Beta Was this translation helpful? Give feedback.
-
I just noticed this warning when starting the service: Might be a bug in Hibernate Validator: https://hibernate.atlassian.net/browse/HV-1852 Setting the "parameters" option in the Maven Compiler Plugin as suggested on StackOverflow doesn't fix it. Do you think we can safely ignore this warning? |
Beta Was this translation helpful? Give feedback.
-
Hello. I'm a bit confused if dropwizard 4.0 has jetty 10 or 11. It looks like 11 but this part got copied from 3.0 release and not updated for 4.0. Am I assuming it right? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your continuous efforts and latest improvements to Dropwizard. While trying to upgrade from an older version, I ran into a problem with logging. My build.gradle contains dropwizard-logging 4.0.0 as a dependency. The problem is that the server immediately terminates with the following exception:
The referenced slfj4 docs state that placing one of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar should solve the problem. I tried adding several of them (one at a time) as a dependency to my build.gradle, but keep getting the same exception. Is there a simple solution, without resorting to external logging? |
Beta Was this translation helpful? Give feedback.
-
Hi dropwizard dudes, ;) we just noticed that the dropwizard-gelf AppenderFactory (https://github.com/gini/dropwizard-gelf) is not loaded anymore in DW4, so we can't configure logging against Graylog. Is that to be expected? And what would be ways around that? Any input is appreciated. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hello dropwizard team! We are currently in the process of moving from Dropwizard 2 -> Dropwizard 4. We noticed that our
When upgraded to Dropwizard 4 no longer seems to throw an exception when the function is called with a null parameter
Trying to debug this issue has been tough as reading the documentation it seems that it would be expected that this would work out of the box https://www.dropwizard.io/en/stable/manual/validation.html We have tried to use the @NotNull annotation that belongs to the jakarta.validation library but that too seems to not be plumbed together. An observation we had is that Dropwizard 4.0 now uses hibernate-validator version 8.0.1.Final but the release notes say that Dropwizard is compatible with hibernate 6. https://www.dropwizard.io/en/stable/manual/upgrade-notes/upgrade-notes-4_0_x.html It looks like the Environment.getValidator() returns a jakarta.Validator and that the hibernate-validator 8 also accepts this so it doesnt look like there is an issues here. Another observation is that dropwizard 4 looks like its using JakartaEE 9 and hibernate 8 seems to support Jakarta 10. Hibernate 7 uses JakartaEE 9 but overriding the build file to use it doesnt solve the issue Has anyone had any issues similar to the one we are facing? And if they have is there a known issue? If not is there configuration code I can be pointed towards where these annotations would be configured at run time so I can take a deeper look there into what may be happening. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Dropwizard 4.0.0
It's finally here, the next major release of Dropwizard! This one has been developed and released in tandem with Dropwizard 3.0.0.
If you're wondering what the differences are: Not much!
3️⃣ Dropwizard 3.0.0 is still based on and is using dependencies for Java EE and the
javax.*
package namespace. The effort to migrate from Dropwizard 2.x to Dropwizard 3.0.0 should be minimal for many projects.4️⃣ Dropwizard 4.0.0 is based on and is using dependencies for Jakarta EE and the
jakarta.*
package namespace. The effort to migrate from Dropwizard 2.x to Dropwizard 4.0.0 might be bigger due to more package changes and more breaking changes in our dependencies.📣 In any case, let us know how the migration went and if you were missing anything important in the upgrade notes in our GitHub Discussions!
For a full list of relevant changes please refer to the Upgrade Notes for Dropwizard 4.0.x.
Java 11 baseline
Dropwizard 4.0.0 and later require Java 11 as a baseline. Later versions of Java are also working.
Dropwizard Package Structure and JPMS
In order to properly support the Java Platform Module System (JPMS), the Java packages in modules must not overlap, or put differently, the packages may not be split into multiple modules.
Dropwizard 4.0.0 won’t enable full support for the JPMS. Instead, as a transition step, automatic modules are introduced.
Affected packages:
dropwizard-core
io.dropwizard
io.drowizard.core
dropwizard-logging
io.dropwizard.logging
io.dropwizard.logging.common
dropwizard-metrics
io.dropwizard.metrics
io.dropwizard.metrics.common
dropwizard-views
io.dropwizard.views
io.dropwizard.views.common
Transition to Jakarta EE
Previously released Dropwizard versions used Java/Jakarta EE dependencies under the
javax
namespace. Dropwizard 4.0.x transitioned to Jakarta EE 9 components and therefore utilize the newjakarta
namespace for many components.This means that most of the imports of existing applications using Dropwizard 2.x or 3.x will have to be changed from the
javax
to thejakarta
namespace. However, other components still use thejavax
namespace, so a simple search and replace could break other imports.Jakarta EE 9 compatibility
As stated above, Dropwizard 4.0.x will transition to Jakarta EE 9 components. This means, Dropwizard will now try to be consistent with one specific EE version.
Therefore Dropwizard 4.0.x will stay on components of Jakarta EE 9 and the transition to components of Jakarta EE 10 will be postponed to an other release series.
Since the EE version bump will probably introduce breaking changes, the Jakarta EE 10 components will be most likely integrated in Dropwizard 5.0.x and not in a 4.1.x release.
Jetty 11
The main change introduced in Dropwizard 4.0.0 is the upgrade to Jetty 11.0.x. Jetty 11.0.x is built for Java 11, therefore the Java version change was necessary.
This change comes with some migration cost. For detailed information regarding the changes introduced in Jetty 11.0.x, refer to the Jetty migration guide.
Apache HttpClient 5
The version of Apache HttpClient used in dropwizard-client has been updated to version 5.x.
For more information refer to the Apache HttpClient 5.0 migration guide.
Hibernate 6
Hibernate 5.6 provides compatible implementations for JPA 2.2 and for Jakarta Persistence 3.0.
But Hibernate 6.0 and 6.1 still provide compatible implementations for Jakarta Persistence 3.0, so we upgraded to Hibernate 6.1 in Dropwizard 4.0.x.
If any other aspects from Hibernate are used in an application rather than those provided by Dropwizard, there might be an additional migration cost. Please follow the Hibernate 6 migration guide and the Hibernate 6.1 migration guide, if you encounter any problems.
Removed Support for JUnit 4.x
Support for testing with JUnit 4.x has been moved from
dropwizard-testing
to dropwizard-testing-junit4.🥇 Special thanks
The release of Dropwizard 3.0.0 wouldn't have been possible without the help of the community (YOU!) and especially the following contributors:
@zUniQueX, @rhowe, @pstackle, @dennyac, and countless others!
What's Changed since Dropwizard 4.0.0-beta.4
Full Changelog: v4.0.0-beta.4...v4.0.0
This discussion was created from the release v4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions