Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3035

Thrift maven dependency misses org/slf4j/impl/StaticLoggerBinder which requires to run thrift client and server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • None
    • None
    • Deployment, Java - Library
    • None

    Description

      I have added
      <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>0.9.2</version>
      </dependency>
      to the pom.xml of my maven project, which uses thrift.
      At run time I'm getting a error as follows

      Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
      at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
      at rpc.node$Processor.<clinit>(node.java:212)
      at p2p.Controller.main(Controller.java:168)
      Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 7 more

      from node.java file which was the thrift auto generated file.
      I believe adding thrift maven dependency should add this dependency to the project.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cdwijayarathna Chamila Dilshan Wijayarathna
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: