Hello everybody, we have found a hard to track problem, which can happen to You also if You use JDK 6 to compile your classes in GWT. The problem has been caused our unawareness of the mechanism how JDK 6 javac compiler searches for types during compilation (http://java.sun.com/javase/6/ docs/technotes/tools/windows/javac.html#searching). If the javac founds a source file for a referenced type, which has a newer timestamp as the found class, then it will compile that source file also. This is the default behavior of javac. An example: The GWT's gwt-user.jar library contains both source files and class files for javax.servlet.* types. If there is a standard servlet.jar in the classpath of the javac during compilation and the servlet.jar is placed before the gwt-user.jar in the classpath, then the javac will compile the referenced javax.servlet.* types to your application also! javax.* types should not be part of your application and they can cause application fail (for example ClassCastException, when the servlets of your application are loaded). Similar problem can happen, when You override some types (because you want to use them in GWT client) and You do not use the super-source functionality of gwt module definition, which enables to place your custom types in a different package as their original overridden mates.
Fortunately the mentioned javac functionality can be switched out through the "-implicit:none" javac argument (see http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html). According to our experience I recommend to use this argument in your GWT projects, when your classes are compiled by javac. Also I recommend to use the super-source functionality in your gwt module definition, if You need to override some types. Have a nice day, Gabriel -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
