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

[Bug] pulsar-client-all 2.11.0 transitively bringing in log4j2 implementation #19484

Closed
1 of 2 tasks
onobc opened this issue Feb 10, 2023 · 5 comments · Fixed by #19937
Closed
1 of 2 tasks

[Bug] pulsar-client-all 2.11.0 transitively bringing in log4j2 implementation #19484

onobc opened this issue Feb 10, 2023 · 5 comments · Fixed by #19937
Assignees
Labels
type/bug The PR fixed a bug or issue reported a bug

Comments

@onobc
Copy link
Contributor

onobc commented Feb 10, 2023

Search before asking

  • I searched in the issues and found nothing similar.

Version

  • OS: <not applicable>
  • Pulsar: 2.11.0

Details

Problem

The pulsar-client-all:2.11.0 dependency transitively includes Log4j2 (see here) rather than just the SLF4J api and logging bridge.
Whereas the pulsar-client-all:2.10.3 does NOT bring a logging impl in (see here).

Symptoms

If the consuming app is already using a logger impl then a conflict can occur at startup (when using SLF4J) telling user to pick one or the other.

If the consuming application is not already using a logger impl then pulsar-client-all effectively chooses LOG4J2 for the app.

What did you expect to see?

Adding the dependency org.apache.pulsar:pulsar-client-all:2.11.0 should NOT transitively bring in the log4j2 implementation.

What did you see instead?

Adding the dependency org.apache.pulsar:pulsar-client-all:2.11.0 transitively DID bring in the log4j2 implementation.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@github-actions
Copy link

The issue had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Mar 13, 2023
@tisonkun tisonkun self-assigned this Mar 27, 2023
@tisonkun
Copy link
Member

Thanks for reporting this issue. It seems we accidentally change log4j libs from test dep to compile dep. I'm looking into this one now.

cc @Technoboy- @codelipenghui @eolivelli possible related release manager

@tisonkun
Copy link
Member

This seems a bookkeeper issue apache/bookkeeper@f0988dd#r106236889.

We can force all log4j deps in test scope to workaround the case for now.

@tisonkun
Copy link
Member

The pollute path is: pulsar-client -> pulsar-common -> bookkeeper:cpu-affinity -> bookkeeper:parent

@tisonkun
Copy link
Member

Fixed and cherry-picked to 2.11 at 2d8af31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants