org.slf4j.LoggerFactory error

246 views
Skip to first unread message

zot...@gmail.com

unread,
Oct 27, 2016, 5:18:45 PM10/27/16
to ReactiveMongo - http://reactivemongo.org
We got this error. Looked at the docs and the community site and tried adding all of the following to our build.sbt in various combinations and permutations with no luck:


libraryDependencies ++= Seq(
  
"org.slf4j" "slf4j-simple" "1.7.21"
)

libraryDependencies ++= Seq(
  
"org.slf4j" "slf4j-log4j12" "1.7.21"
)

libraryDependencies ++= Seq"org.slf4j" "log4j-over-slf4j" "1.7.21")

Any help would be appreciated.

Cédric Chantepie

unread,
Oct 28, 2016, 3:09:19 AM10/28/16
to ReactiveMongo - http://reactivemongo.org
As it doesn't seem to be specific to ReactiveMongo, but to be a build issue, I suggest you ask on SO, giving error details.

zot...@gmail.com

unread,
Oct 28, 2016, 8:41:03 AM10/28/16
to ReactiveMongo - http://reactivemongo.org
Thanks for the response. However it is specific to reactivemongo, as the error is caused by a call of reactivemongo.

Also, just to clarify, as I noted in my post this issue has been covered in the doco and here as well. My attempts as described above are trying to follow what doco and people here said would solve the problem.

Thanks.

Here's the error message BTW:

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

at reactivemongo.util.LazyLogger$.apply(LazyLogger.scala:27)

at reactivemongo.api.MongoDriver$.<init>(api.scala:1168)

at reactivemongo.api.MongoDriver$.<clinit>(api.scala)

at controllers.CsvParser$.<init>(CsvParser.scala:89)

at controllers.CsvParser$.<clinit>(CsvParser.scala)

at controllers.CsvParser.main(CsvParser.scala)

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

Cédric Chantepie

unread,
Oct 28, 2016, 1:05:48 PM10/28/16
to ReactiveMongo - http://reactivemongo.org

A T

unread,
Oct 28, 2016, 5:54:47 PM10/28/16
to reacti...@googlegroups.com
Actually, as noted we did look at the docs which is why we included the logger in our bet as recommended on that page. It still didn't work.

It turned out to be a problem w/the ivy cache. Invalidating & rebuilding the project got us past this problem.

Sent from my iPad

> On Oct 28, 2016, at 20:05, Cédric Chantepie <chantep...@gmail.com> wrote:
>
> You could first have a look at the documentation : http://reactivemongo.org/releases/0.12/documentation/release-details.html#logging
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/reactivemongo/0_4JD2OXLG8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to reactivemong...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages