On 20 June 2011 11:59, Nathan Klatt <n8kl...@gmail.com> wrote: > I've inherited a GWT project and I'm receiving the following compiler error > (more info below): > > [java] [ERROR] Line 51: No source code is available for type > java.lang.NoSuchFieldError; did you forget to inherit a required module? > > It's complaining about a core part of the language here, right? Why is it > looking for source code for it at all? Is it not finding one of the core jar > files? Do I need to point it at something in the ant build.xml file?
GWT doesn't support *everything* available in the Java core libraries. > For testing purposes, I followed all the GWT instructions, used > webAppCreator to generate a "Hello, world." app, and that builds and runs > just fine. I added a simple try...catch(NoSuchFieldError err) - and an > import java.lang.NoSuchFieldError line - and it gave me the error. > > I'm new to this Java/GWT stuff so I suspect I'm missing something obvious - > I'd love it if you could point out exactly what! :) Without knowing why you want to catch NoSuchFieldError, I'd say the "obvious" answer is not to catch NoSuchFieldError. :-) Try it with e.g. IllegalStateException instead (assuming you just want to test exception handling). -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.