Saturday, April 27, 2013

Re: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

On Saturday, April 27, 2013 1:53:39 AM UTC+2, Kris wrote:
Hi, I have a class path problem. 

Using eclipse juno, maven plugin and gwt plugin. 

In my gwt server code I use slf4j. When doing something on the gui that makes a RPC I get.. 

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

My project has a maven structure, and has 

scope=provided means the JAR won't end up in your WEB-INF/lib and will have to be provided (sic!) by the servlet container (in DevMode's case, by the DevMode)

Google settings : War directory : src/main/webapp

I seem to have a lot of problem with having a maven GWT project. Seems like the maven plugin and the GWT plugin really dont work together that well.

They do play well together, but you have to understand the basics of how they work and the implications of your choices.
It seems like you'll have a particular deployment setup (it'll provide Slf4j, rather than Slf4j being bundled in the WAR), in which case you'd better run DevMode in -noserver mode (i.e. only for client-code) and deploy the server code in your own container (using whichever Eclipse plugin is appropriate; I like to simply use the jetty-maven-plugin or tomcat7-maven-plugin, but you can use Sonatype's Webby or Eclipse WTP).

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment