-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
log4j-layout-template-json:2.21.0 Introduced Backward Incompatible Change #1895
Comments
@iManageDave, thanks for the heads up! The new OSGi/JPMS descriptors are... new. 😅 I will take care of your issue and probably do a patch release. (Note that this is a quick response, I still need to verify your finding and figure out what needs to be done.) For the records, |
Thanks for the blindingly fast response, @vy! JPMS helps keep us (esp. me!) honest 😉 |
We use BND to generate JPMS and OSGi descriptors. Unfortunately BND considers API leakage a warning:
so we didn't see it. Fortunately we can configure BND to mark these warning as errors. |
Came here to make the same bug report, but @iManageDave was faster. Here's the error that I get, different symptom same cause: |
@iManageDave, @rickardoberg, could you give the recently uploaded |
If I mvn install our project with 2.21.0 for all other log4j artifacts and the 2.22.0-SNAPSHOT for template only, then it works. However, if I use 2.22.0-SNAPSHOT for all log4j artifacts then I get the following error: So seems like you've fixed your issue, but some other module introduced an OSGi dependency. |
@rickardoberg, I am checking stuff out on my side, though OSGi/JPMS is not my primary expertise. I would really appreciate it if you can bisect the problematic Log4j artifact. That is, switch |
I am able to compile with
|
Use JDK 11 (not 17) to compile and run tests. The |
@ppkarwasz I'll give that a shot, but that is not a long term solution as we use language features of 17. |
Same error. Notice |
@iManageDave, @rickardoberg, could you give the most recent |
@vy I was able to build successfully, including unit tests, with the new snapshot (Java 17, 2.21.1 of the other Log4J libs). Thanks! |
@vy FYI, I also built successfully with all Log4J 2.22.0-SNAPSHOT libs. |
@iManageDave, great! Thanks for helping with the troubleshooting. Closing the issue – @rickardoberg, feel free to re-open it if the fix doesn't work for you. |
Description
My organization has developed a Log4J plugin that implements an
EventResolver
. The plugin compiles with version 2.20.0 but not 2.21.0 due to it's newly addedmodule-info.java
. 2.21.0'smodule-info.java
is a welcome addition; however, it exportsEventResolver
but notJsonWriter
which is referenced by theTemplateResolver<V>
super-interface. This results in a compilation error.Configuration
Version: 2.21.0
Operating system: Ubuntu 22.04
JDK: OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1)
Logs
The text was updated successfully, but these errors were encountered: