[ https://issues.apache.org/jira/browse/CXF-7792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558444#comment-16558444 ]
Andriy Redko edited comment on CXF-7792 at 7/26/18 3:41 PM: ------------------------------------------------------------ Apparently, you hit this issue https://issues.apache.org/jira/browse/ARIES-960. So let as do that, add this dependency to pom.xml: {code:java} <dependency> <groupId>io.zipkin.reporter</groupId> <artifactId>zipkin-sender-libthrift</artifactId> <version>1.0.2</version> </dependency>{code} Than create a class in the demo.jaxws.tracing.server.impl package, TracingFactory {code:java} package demo.jaxws.tracing.server.impl; import brave.Tracing; import brave.sampler.Sampler; import zipkin.reporter.AsyncReporter; import zipkin.reporter.Sender; import zipkin.reporter.libthrift.LibthriftSender; public abstract class TracingFactory { public static Tracing create() { final Sender sender = LibthriftSender.create("http://IP-address:9411/api/v2/spans"); return Tracing .newBuilder() .localServiceName("Gis") .reporter(AsyncReporter.builder(sender).build()) .sampler(Sampler.ALWAYS_SAMPLE) /* or any other Sampler */ .build(); } } {code} Than replace all brave-related beans with: {code:java} bean id="brave" class="demo.jaxws.tracing.server.impl.TracingFactory" factory-method="create" />{code} Attaching modified jaxws_tracing_brave_osgi sample to the ticket. was (Author: reta): Apparently, you hit this issue https://issues.apache.org/jira/browse/ARIES-960. So let as do that, add this dependency to pom.xml: Than create a class in the demo.jaxws.tracing.server.impl package, TracingFactory {code:java} package demo.jaxws.tracing.server.impl; import brave.Tracing; import brave.sampler.Sampler; import zipkin.reporter.AsyncReporter; import zipkin.reporter.Sender; import zipkin.reporter.libthrift.LibthriftSender; public abstract class TracingFactory { public static Tracing create() { final Sender sender = LibthriftSender.create("http://IP-address:9411/api/v2/spans"); return Tracing .newBuilder() .localServiceName("Gis") .reporter(AsyncReporter.builder(sender).build()) .sampler(Sampler.ALWAYS_SAMPLE) /* or any other Sampler */ .build(); } } {code} Than replace all brave-related beans with: {code:java} bean id="brave" class="demo.jaxws.tracing.server.impl.TracingFactory" factory-method="create" />{code} Attaching modified jaxws_tracing_brave_osgi sample to the ticket. > Distributed Tracing with OpenZipkin Brave and OSGi > -------------------------------------------------- > > Key: CXF-7792 > URL: https://issues.apache.org/jira/browse/CXF-7792 > Project: CXF > Issue Type: Wish > Components: Tracing Brave > Affects Versions: 3.2.5 > Reporter: bambus > Priority: Critical > Attachments: image-2018-07-25-09-01-33-506.png, > jaxws_tracing_brave_osgi.zip > > > I have followed your example and brave example for implementing brave in cxf > based application. After I added brave I could not package it like bundle. I > always get different errors. Error like: Caused by: > java.lang.NoClassDefFoundError: zipkin/reporter/Reporter > Another one: Caused by: java.lang.ClassCastException: Cannot cast > org.apache.cxf.service.factory.FactoryBeanListenerManager to > org.apache.cxf.service.factory.FactoryBeanListenerManager > I am using Service Mix 7.0.1 with Karaf 4.0.9. > Can you help me how to pack it like as a bundle. > In this example that thing is missing: > > [https://cwiki.apache.org/confluence/display/CXF20DOC/Using+OpenZipkin+Brave#UsingOpenZipkinBrave-SpringXML-Configuration] > I have configured the blueprint like in the example. -- This message was sent by Atlassian JIRA (v7.6.3#76005)