Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLF4J: Class path contains multiple SLF4J bindings. #1

Open
ty-bt opened this issue Dec 20, 2014 · 4 comments
Open

SLF4J: Class path contains multiple SLF4J bindings. #1

ty-bt opened this issue Dec 20, 2014 · 4 comments
Assignees

Comments

@ty-bt
Copy link

ty-bt commented Dec 20, 2014

Error |
SLF4J: Class path contains multiple SLF4J bindings.
Error |
SLF4J: Found binding in [jar:file:/C:/grails-2.4.4/dist/grails-plugin-log4j-2.4.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Error |
SLF4J: Found binding in [jar:file:/C:/Users/admin/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Error |
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Error |
SLF4J: Actual binding is of type [org.slf4j.impl.GrailsSlf4jLoggerFactory]

grails 2.4.4
I can't speak English
Help have a look
Thank you

@Alotor
Copy link
Owner

Alotor commented Dec 20, 2014

Hi!
Seems like SLF4J is finding two implementations (logback and log4j)

Could you paste your BuildConfig.groovy file?

@Alotor Alotor closed this as completed Dec 20, 2014
@Alotor Alotor self-assigned this Dec 20, 2014
@Alotor Alotor reopened this Dec 20, 2014
@ty-bt
Copy link
Author

ty-bt commented Dec 21, 2014

grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
}
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()
    // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
    //mavenRepo "http://repository.codehaus.org"
    //mavenRepo "http://download.java.net/maven/2/"
    //mavenRepo "http://repository.jboss.com/maven2/"
    mavenRepo "http://dl.bintray.com/debop/maven"

}

dependencies {
    // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
    // runtime 'mysql:mysql-connector-java:5.1.29'
    // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
    test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
}

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55"

    // plugins for the compile step
    compile ":scaffolding:2.1.2"
    compile ':cache:1.1.8'
    compile ":asset-pipeline:1.9.9"
    compile ":redis-hibernate-cache:1.0"

    // plugins needed at runtime but not for compilation
    runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"
    runtime ":redis:1.6.0"

    // Uncomment these to enable additional asset-pipeline capabilities
    //compile ":sass-asset-pipeline:1.9.0"
    //compile ":less-asset-pipeline:1.10.0"
    //compile ":coffee-asset-pipeline:1.8.0"
    //compile ":handlebars-asset-pipeline:1.3.0.3"
}

}

@Alotor
Copy link
Owner

Alotor commented Jan 7, 2015

I've been checking and it's quite strange. The dependency resolution seems to not being working quite right...

You can work around this problem by setting-up the plugin like this:

compile ":redis-hibernate-cache:1.0", {
    excludes "logback-classic"
}

If I find a better solution I'll let you know.

Best

@aydinozturk
Copy link

I've been checking and it's quite strange. The dependency resolution seems to not being working quite right...

You can work around this problem by setting-up the plugin like this:

compile ":redis-hibernate-cache:1.0", {
    excludes "logback-classic"
}

If I find a better solution I'll let you know.

Best

Thanks bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants