Solution: Failure to load module 'path.to.my.WidgetSet'

If your widgets compile in Eclipse, but hosted mode browser crashes with a stack trace similar to this:

[ERROR]
 Failure to load module 'path.to.my.WidgetSet'
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.genericType()Lorg/eclipse/jdt/internal/compiler/lookup/ReferenceBinding;
	at com.google.gwt.dev.jdt.TypeRefVisitor.maybeDispatch(TypeRefVisitor.java:178)
	at com.google.gwt.dev.jdt.TypeRefVisitor.endVisit(TypeRefVisitor.java:96)
	at org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.traverse(ParameterizedSingleTypeReference.java:222)
	at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.traverse(FieldDeclaration.java:285)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1142)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:487)
	at com.google.gwt.dev.javac.BinaryTypeReferenceRestrictionsChecker.findAllBinaryTypeReferenceSites(BinaryTypeReferenceRestrictionsChecker.java:144)
	at com.google.gwt.dev.javac.BinaryTypeReferenceRestrictionsChecker.check(BinaryTypeReferenceRestrictionsChecker.java:114)
	at com.google.gwt.dev.javac.CompilationUnitInvalidator.validateCompilationUnits(CompilationUnitInvalidator.java:139)
	at com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:123)
	at com.google.gwt.dev.cfg.ModuleDef.updateTypeOracle(ModuleDef.java:477)
	at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:324)
	at com.google.gwt.dev.GWTShell$BrowserWidgetHostImpl.createModuleSpaceHost(GWTShell.java:252)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:72)
	at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
	at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
	at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
	at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
	at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)

it probably means that you have Tomcat 5.5 (or newer) libraries in the classpath of your hosted mode launch configuration.

If your project is a dynamic web project attached to a Tomcat instance, and you create a new launch configuration (as explained in the chapter 8.7.6 of the manual) Eclipse adds everything in your project (including the Tomcat libraries) into the classpath of the GWTShell launch configuration. Tomcat 5.5 (or later) libraries conflict with GWT, so you need to remove them from the launch configuration’s classpath. After that the hosted mode should work ok.

I am facing this challenge. Some how strangely I didnt face it in the past. Can you point to me which libraries one would need to delete.

thanks
Srikanth

Hi All,

I would really appreciate if some one can giveme anseer the to the question i posted here. I am postign the same questionf ro the last few days on the skype channel but no one seems to know. The person who mentions this says to remove the tomcat libraries it would be nice to know which exactly need to be removed. At this point debugging GTW code in vaadin is not happening. I am ending going through rudimentary processof adding labels in GWT code to debug.

I found the solution fo rthis issue. There was classpath conflict and I had to just move gwt jars to top in the order of export.