Vert.x, Eclipse and Maven issues: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

440 views
Skip to first unread message

idlemind

unread,
Dec 10, 2014, 9:15:41 AM12/10/14
to ve...@googlegroups.com

Hello All,

Have been struggling with this for past two days trying to run a vertx module using  Eclipse IDE. The module builds perfectly and runs all the tests from the command prompt but when I imported the module in eclipse it throuws an eception: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

Steps Followed:
- Created an eclipe project from pom.xml of io.vertx:vertx-maven-archetype (-)
- Imported the project in  Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 2.

Exception:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Project - core-mod 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ core-mod ---
[INFO] Deleting C:\core-mod\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.300s
[INFO] Finished at: Wed Dec 10 06:01:19 PST 2014
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------

Would really appreciate some guidance here.

Thanks

Alexander Lehmann

unread,
Dec 10, 2014, 9:45:16 AM12/10/14
to ve...@googlegroups.com
Maven 3.1 and above uses slf4j internally, while Maven 3.0 and before used their own logging implementation.

When running the vertx module inside Maven (2.1x), you may get problems with the slf4j already loaded, however this should not be the case in vert.x since that doesn't use the runMod operation.

To narrow this down a bit, could you please specify which maven version you are using and which version of vert.x

idlemind

unread,
Dec 10, 2014, 11:00:08 AM12/10/14
to ve...@googlegroups.com
I'm using Apache Maven 3.1.1. 

Just managed to run my first mvn Test. Resolved the issue as follows:  
  1. Eclipse Kepler comes with a pre-installed version of maven, This Pre-installed version throws exception “slf4j: failed to load class "org.slf4j.impl.staticloggerbinder"”during mvn clean command.

  2. I configured my local maven installation as a default instead of using m2e integrated maven: To do this, select eclipse menu--> windows-->preferences-->Maven--> installations-->Add: Add and select local M2_HOME directory.

Alexander Lehmann

unread,
Dec 10, 2014, 3:24:18 PM12/10/14
to ve...@googlegroups.com
Ah yes, I think that is a m2e issue, not a vert.x issue. I got this a while back after reinstalling eclipse and I have switched to an external maven again.
Reply all
Reply to author
Forward
0 new messages