Wednesday, September 24, 2008

GWT - the hard way

I'm using GWT 1.5.2 in a new project since few days and I've learned the following lessons the hard way:
  • If you have the following remote service call
    List {genericType B} serviceCall(int i) { ... } where B extends A implements IsSerializable and do not have a default empty constructor in A, GWT will show a meaningful stack trace so you will be able to see ASAP that you need that empty constructor, BUT if you forgot to put the empty constructor into the class B ... then you'll get it the hard way: no trace. No meaningfull info. Only the com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details exception. where the server log is nowhere.
  • Do not EVER copy/paste GWT sample code into your project (e.g. incubator code) while having also the sample code libs in your project classpath. Do not ask me why but your CSS will be sooo messed up and you will NOT know why. Take a pill, grab the next cup of coffee and RENAME the things you are pasting into your project. (Do not forget to rename in all the places, such as the module descriptor, HTML wrapper, etc. be good guy and include the styleshees etc etc).
Stay tuned for more, I have the shitty feeling that it's not over yet, and I still have to walk the hard path ...