[ https://issues.apache.org/jira/browse/THRIFT-3035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332574#comment-16332574 ]
Alexander Volanis commented on THRIFT-3035: ------------------------------------------- The slf4j choice of implementation should be given to the consumer of libthrift and not dictated by the dependency. IMHO the current dependency is correct in declaring the org.slf4j:slf4j-api as a non-optional compile dependency and leaving the implementation undefined. Slf4j bridge implementations for all popular logging backends are available. > Thrift maven dependency misses org/slf4j/impl/StaticLoggerBinder which > requires to run thrift client and server > ---------------------------------------------------------------------------------------------------------------- > > Key: THRIFT-3035 > URL: https://issues.apache.org/jira/browse/THRIFT-3035 > Project: Thrift > Issue Type: Bug > Components: Deployment, Java - Library > Reporter: Chamila Dilshan Wijayarathna > Priority: Major > > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)