Thursday, August 26, 2010

Google Web Toolkit: Jar not loaded

When a Google Web Toolkit (GWT) web application is deployed to Tomcat web server,
you may encounter a warning message as follows.
org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(<$webAppsFolder$>\WEB-INF\lib\gwt-user.jar) - jar not loaded.
See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

This raises just because WebappClassLoader has loaded the servlet.jar already. The gwt-user.jar already contain the content of the servlet.jar file. Even though this message can be ignored, this warning message can be avoided just by replacing the gwt-user.jar file with gwt-servlet.jar (which comes with Google Web Toolkit (GWT) download).

gwt-servlet.jar has been created by removing the content of the servlet.jar from the gwt-user.jar, so this change will not have any impact on your project.