Uploaded image for project: 'HTrace'
  1. HTrace
  2. HTRACE-233

htrace-zipkin should explicitly include slf4j-api to avoid ClassNotFoundException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 4.0
    • 4.0
    • build
    • None
    • 4.0

    Description

        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
      Caused by: java.lang.NoClassDefFoundError: org/apache/htrace/slf4j/LoggerFactory
        at org.apache.htrace.thrift.transport.TIOStreamTransport.<clinit>(TIOStreamTransport.java:38)
        at org.apache.htrace.impl.ZipkinSpanReceiver$WriteSpanRunnable.<init>(ZipkinSpanReceiver.java:214)
        at org.apache.htrace.impl.ZipkinSpanReceiver.configure(ZipkinSpanReceiver.java:178)
        at org.apache.htrace.impl.ZipkinSpanReceiver.<init>(ZipkinSpanReceiver.java:155)
        ... 36 more
      Caused by: java.lang.ClassNotFoundException: org.apache.htrace.slf4j.LoggerFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      

      Looking in the jar I can only see the following classes

      org/apache/htrace/slf4j/impl/NOPLoggerFactory.class
      org/apache/htrace/slf4j/impl/StaticLoggerBinder.class
      org/apache/htrace/slf4j/impl/StaticMarkerBinder.class
      org/apache/htrace/slf4j/impl/StaticMDCBinder.class
      

      LoggerFactory is in slf4j-api which is not included explicitly and not picked up during relocation.

      I'll send a patch

      Attachments

        1. HTRACE-233.patch
          1 kB
          Cosmin Lehene
        2. HTRACE-233-addendum.patch
          0.6 kB
          Cosmin Lehene

        Issue Links

          Activity

            People

              clehene Cosmin Lehene
              clehene Cosmin Lehene
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: