Hey Alfredo, Like the error message says, calling GWT.create() only makes sense in code runs in the browser. A lot of code in GWT ends up calling GWT.create() -- this is how the compiler knows how to send the right code to a given browser. So it sounds like you want to rethink what parts of your code are running in a JVM, and which are in a browser.
For a sense of what that means in practice, you could take a look at the docs on the topic: http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideClientSide http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideDeferredBinding Hope this helps! On Thu, Jun 11, 2009 at 4:08 PM, ajperez4<pere...@gmail.com> wrote: > > Hi all, > > has somebody tried to invoke a GWT service from a J2SE app? > > When trying to invoke the service as the same way in a GWT client app > I get the following: > > Exception in thread "AWT-EventQueue-0" > java.lang.UnsupportedOperationException: ERROR: GWT.create() is only > usable in client code! It cannot be called, for example, from server > code. If you are running a unit test, check that your test case > extends GWTTestCase and that GWT.create() is not called from within an > initializer or constructor. > at com.google.gwt.core.client.GWT.create(GWT.java:91) > > thanks! -- Alex Rudnick swe, gwt, atl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---