score:75

Accepted answer

i can also confirm this error.

workaround: is to use external maven inside m2eclipse, instead of it's embedded maven.

that is done in three steps:

1 install maven on local machine (the test-machine was ubuntu 10.10)

mvn --version

apache maven 2.2.1 (rdebian-4) java version: 1.6.0_20 java home: /usr/lib/jvm/java-6-openjdk/jre default locale: de_de, platform encoding: utf-8 os name: "linux" version: "2.6.35-32-generic" arch: "amd64" family: "unix"

2 run maven externally link how to run maven from console

> cd path-to-pom.xml
> mvn test
    [info] scanning for projects...
    [info] ------------------------------------------------------------------------
    [info] building simple
    [info]    task-segment: [test]
    [info] ------------------------------------------------------------------------
    [...]
    [info] surefire report directory: [...]/workspace/simple/target/surefire-reports
    
    -------------------------------------------------------
     t e s t s
    -------------------------------------------------------
    running net.tverrbjelke.experiment.mainapptest
    hello world
    tests run: 1, failures: 0, errors: 0, skipped: 0, time elapsed: 0.042 sec
    
    results :
    
    tests run: 1, failures: 0, errors: 0, skipped: 0
    
    [info] ------------------------------------------------------------------------
    [info] build successful
    [info] ------------------------------------------------------------------------
    [...]

3 inside m2eclipse: switch from embedded maven to local maven

  • find out where local maven home installation dir is (mvn --version, or google for your maven_home, for me this helped me that is /usr/share/maven2 )
  • in eclipse menu->window->preferences->maven->installation-> enter that string. then you should have switched to your new external maven.
  • then run your project as e.g. "maven test".

the error-message should be gone.

score:-1

this is not an error message but a warning. it is very clearly explained in their website as :

this warning, i.e. not an error, message is reported when no slf4j providers could be found on the class path. placing one (and only one) of slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem. note that these providers must target slf4j-api 1.8 or later.

in the absence of a provider, slf4j will default to a no-operation (nop) logger provider.

https://www.slf4j.org/codes.html#staticloggerbinder

score:0

i had the similar issue for my spring boot - gradle application running on eclipse luna. i could resolve it by manually adding an entry in my project's .classpath

<classpathentry sourcepath="c:/users/<username>/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.7/3150039466ad03e6ef1c7ec1c2cbb0d96710cf64/slf4j-simple-1.7.7-sources.jar" kind="lib" path="c:/users/<username>/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.7/8095d0b9f7e0a9cd79a663c740e0f8fb31d0e2c8/slf4j-simple-1.7.7.jar"/>

idea is to follow this solution. but how to implement is dependent on case to case. one way of fixing is the one that i used above.

hope this helps.

score:0

i had the same problem in writing the kafka producer program using java. this error is coming due to the wrong slf4j library. use below slf4j-simple maven dependency that will fix your problem.

<dependency>
    <groupid>org.slf4j</groupid>
    <artifactid>slf4j-simple</artifactid>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>

score:0

i had same problem. i solved it with this way. add this dependencies to maven "pom.xml" and reload maven. than try to run your code.
` org.slf4j slf4j-nop 2.0.0-alpha5 test

    <dependency>
        <groupid>org.slf4j</groupid>
        <artifactid>slf4j-api</artifactid>
        <version>2.0.0-alpha5</version>
    </dependency>
    <dependency>
        <groupid>org.slf4j</groupid>
        <artifactid>slf4j-simple</artifactid>
        <version>2.0.0-alpha5</version>
    </dependency>`

score:0

    <dependency>
        <groupid>org.slf4j</groupid>
        <artifactid>slf4j-nop</artifactid>
        <version>2.0.0-alpha5</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupid>org.slf4j</groupid>
        <artifactid>slf4j-api</artifactid>
        <version>2.0.0-alpha5</version>
    </dependency>
    <dependency>
        <groupid>org.slf4j</groupid>
        <artifactid>slf4j-simple</artifactid>
        <version>2.0.0-alpha5</version>
    </dependency>

score:1

had been over looking the issue having surfaced it. believe this will be a good read for others who come down here with the same issue:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=387064

score:3

you haven't specify version in your maven dependency file may be thats why it is not picking the latest jar
as well as you need another deppendency with slf4j-log4j12 artifact id.
include this in your pom file

<dependency>
    <groupid>org.slf4j</groupid>
    <artifactid>slf4j-log4j12</artifactid>
    <version>1.5.6</version>
</dependency>

let me know if error is still not resolved
i also recomend you to see this link

score:5

had similar error with the same result with gradle and was able to solve it by following:

//compile 'org.slf4j:slf4j-api:1.7.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.1'

out-commented line is the one which caused the error output. i believe you can transfer this to maven.

score:5

paste this code to your pom.xml file. it works for me.

<dependency>
    <groupid>org.slf4j</groupid>
    <artifactid>slf4j-simple</artifactid>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>

score:20

if you are using gradle add this:

dependencies { 
... 
compile "org.slf4j:slf4j-simple:1.7.9" 
... 
}

score:26

there is a documentation in slf4j site to resolve this. i followed that and added slf4j-simple-1.6.1.jar to my aplication along with slf4j-api-1.6.1.jar which i already had.this solved my problem

slf4j


Related Query

More Query from same tag