-
Notifications
You must be signed in to change notification settings - Fork 232
Use SenderFactory classloader for ServiceLoader #523
Conversation
use ClassLoader of class SenderFactory to instantiate the ServiceLoader to prevent a ServiceConfigurationError (java.util.ServiceConfigurationError: io.jaegertracing.spi.SenderFactory: Provider io.jaegertracing.thrift.internal.senders.ThriftSenderFactory not a subtype) Signed-off-by: Dirk Buchhorn <dirkbuchhorn@web.de>
Looks like the failure is on the same line, but different reason: https://travis-ci.org/jaegertracing/jaeger-client-java/jobs/418205475#L1469
You should also be able to reproduce the problem by running |
Signed-off-by: Dirk Buchhorn <dirkbuchhorn@web.de>
The problem was we do the gradle build in the root directory. This build reports only errors from the jaeger-thrift project. After run the build in the jaeger-core project the error was reported. We never used gradle before. |
Codecov Report
@@ Coverage Diff @@
## master #523 +/- ##
============================================
+ Coverage 88.26% 88.27% +<.01%
Complexity 500 500
============================================
Files 65 65
Lines 1849 1850 +1
Branches 239 239
============================================
+ Hits 1632 1633 +1
Misses 140 140
Partials 77 77
Continue to review full report at Codecov.
|
I'm glad this PR introduced you to new tools! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. This LGTM!
use ClassLoader of class SenderFactory to instantiate the ServiceLoader to prevent a ServiceConfigurationError (java.util.ServiceConfigurationError: io.jaegertracing.spi.SenderFactory: Provider io.jaegertracing.thrift.internal.senders.ThriftSenderFactory not a subtype)
Fixes #520
Signed-off-by: Dirk Buchhorn dirkbuchhorn@web.de