SmartGWT 2.4, GWT 2.2.0. Gecko/2010031422 Firefox/3.0.19 (used by GWTTestCase as headless browser).
I have some code that utilizes Criteria objects and have built a GWTTestCase for it. At first, testing this case failed with
java.lang.Exception: com.google.gwt.core.client.JavaScriptException: (null): null
After some research, I found out that, although it was referenced in my app's .gwt.xml, the SmartGwtEntryPoint class is not loaded (or its onModuleLoad() method is not called). This class contains vital code for, ultimately, Criteria.getValues().
My workaround is to simply manually create the entry point and call onModuleLoad() before running the tests:
This is not so much of a problem or question, but wanted to share this case nevertheless.
I have some code that utilizes Criteria objects and have built a GWTTestCase for it. At first, testing this case failed with
java.lang.Exception: com.google.gwt.core.client.JavaScriptException: (null): null
After some research, I found out that, although it was referenced in my app's .gwt.xml, the SmartGwtEntryPoint class is not loaded (or its onModuleLoad() method is not called). This class contains vital code for, ultimately, Criteria.getValues().
My workaround is to simply manually create the entry point and call onModuleLoad() before running the tests:
Code:
SmartGwtEntryPoint smartGwtEntryPoint = new SmartGwtEntryPoint(); smartGwtEntryPoint.onModuleLoad();
Comment