surrealdb / surrealdb.java

SurrealDB SDK for Java
https://surrealdb.com
Apache License 2.0
67 stars 21 forks source link

Error Failed to Load SLF4J #27

Closed ZeyoYT closed 1 year ago

ZeyoYT commented 1 year ago

Hi, i am working on a project with surrealdb java lib, and i am constantly getting this error

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.

i know about this error but i use LogBackClassic and still getting this error , here is my implementation in gradle

dependencies {
    ...
    implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.6'
    ...
    ...
    ...

    implementation files('build/libs/surrealdb-v0.1.0.jar')
}

any way to fix this?

eharrow commented 1 year ago

I was able to reproduce easily enough. The issue is that an older version of slf4j is being bundled in the built jar artefact. PR https://github.com/surrealdb/surrealdb.java/pull/28 fixes this.

phughk commented 1 year ago

Hey @ZeyoYT, @eharrow fixed this and we have merged the change - closing this issue as resolved; Please re-open if it is not resolved.