1

I'm trying to build and GWT MVP application using Guice and Gin. I added Guice and GIN jars to my Eclipse project but i'm stuck with this error:

java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions

I've done a quick Google search and here says the we need to recompile GIN against GWT SDK. Also, the Gin Tutorial mention something about a compilation step.

Isn't enough to add GIN jars to the GWT project, or is mandatory to generate gin.jar from sources? How do i accomplish this with Eclipse (with Google Plugin)?

PS: I'm not using Maven in my Project. Only Eclipse and Google Tools Another PS: Currently using Guice 3.0, Gin 1.5 and GWT 2.3

Carlos Gavidia-Calderon
  • 7,145
  • 9
  • 34
  • 59

2 Answers2

1

If you are using GWT 2.2 or above try using a latest snapshot of gin 1.1 or higher versions and also upgrade guice 3.0.

Shahzeb
  • 4,745
  • 4
  • 27
  • 40
0

For Gin 1.5 there is a pre-gwt-2.2 jar and a post-gwt-2.2 jar. Make sure you have the right one. And probably only one of them should be in the WEB-INF/lib. Make sure both gin and guice are in the lib and in Java Build Path->Libraries. I also have aopalliance.jar, guice-assistedinject-3.0.jar and javax.inject.jar. (Also guice-servlet but that isn't part of the problem here). Make sure you have " " in your .gwt.xml file.

And remember in dev mode that gin uses guice to do most of the work.

Deanna
  • 696
  • 1
  • 5
  • 15