BewareMyPower opened a new pull request #10055:
URL: https://github.com/apache/pulsar/pull/10055
### Motivation
When using `AuthenticationSasl`, `ClassNotFoundException` will be thrown:
> Exception in thread "main" java.lang.RuntimeException:
java.lang.ClassNotFoundException:
org.glassfish.jersey.client.JerseyClientBuilder
The `jersey-client` dependency must be imported. However the version of
`jersey-client` must be consistent with what `pulsar-client-auth-sasl` depends,
which is 2.31 currently. For example, if a newer version of `jersey-client` was
imported like
```xml
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>3.0.1</version>
</dependency>
```
Another exception would be thrown:
> Exception in thread "main" java.lang.NoClassDefFoundError:
jakarta/ws/rs/client/ClientBuilder
So the best way to fix it is adding `jersey-client `a dependency of
`pulsar-client-auth-sasl`.
### Modifications
Add `jersey-client` as dependency of `pulsar-client-auth-sasl`.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]