logging-log4j2: log4j-layout-template-json:2.21.0 Introduced Backward Incompatible Change
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 added module-info.java. 2.21.0’s module-info.java is a welcome addition; however, it exports EventResolver but not JsonWriter which is referenced by the TemplateResolver<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
[ERROR] /home/dave/src/log4j-datamessage-plugin/src/main/java/com/imanage/logging/log4j/layout/template/json/resolver/DataMessageResolver.java:[7,53] package org.apache.logging.log4j.layout.template.json.util is not visible
[ERROR] (package org.apache.logging.log4j.layout.template.json.util is declared in module org.apache.logging.log4j.layout.template.json, which does not export it)
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Export missing OSGi & JPMS modules (#1895) — committed to apache/logging-log4j2 by vy 8 months ago
- Improve BND config (apache/logging-log4j2#1895) — committed to apache/logging-parent by vy 8 months ago
- More JPMS fine-tunings (#1895) — committed to apache/logging-log4j2 by vy 8 months ago
@iManageDave,
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.
@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.