Friday, June 6, 2008

Upgrading to GWT 1.5 M2 with Maven 2 and hibernate4gwt


After the upgrade from GWT 1.4 to 1.5 the app starts correctly and works, but I feel that it is not optimized and takes more memory, takes longer to start and makes the browser to time out: 

I get a lot of "deprecated" warnings in the console. Probably cleaning these would help to speed things up:

[WARN] Deprecated use of gwt.typeArgs for parameter teamGameList; Please use java.util.List<com.ucc.csd.dto.TeamGameDTO> as the parameter's type

Overall, we will wait for the next release of GWT and observe the message boards.


Download the GWT 1.5 M2.
Downloaded new hibernate4gwt.

GWT_HOME = /opt/gwt/gwt-mac-1.5M2

Run the following to add it to the Maven 2 repository:

mvn install:install-file -DartifactId=gwt-user -Dversion=1.5-m2 -Dpackaging=jar -Dfile=/opt/gwt/gwt-mac-1.5M2/gwt-user.jar

mvn install:install-file -DartifactId=gwt-servlet -Dversion=1.5-m2 -Dpackaging=jar -Dfile=/opt/gwt/gwt-mac-1.5M2/gwt-servlet.jar 

mvn install:install-file -DgroupId=net.sf.hibernate4gwt -DartifactId=hibernate4gwt -Dversion=1.0.4b_GWT_1.5_M2 -Dpackaging=jar -Dfile=/opt/gwt/hibernate4gwt-1.0.4b_GWT_1.5_M2/dist/hibernate4gwt-1.0.4b_GWT_1.5_M2.jar

The pom.xml will have these entries:




I had to increase the maxmemory. I run everything from ant:

<target name="hosted" depends="war">
<echo>GWT: starting hosted (dev)</echo>
<java taskname="GWT hosted" classpathref="class_path" classname="" outputproperty="www" fork="true" maxmemory="512m">
<jvmarg value="-verbose" />
<jvmarg value="${JVM_ARG_START}" />
<arg value="com.ucc.csd.CSD/CSD.html" />