Skip to main content

Jar not loaded warning/error in Google Web Toolkit (GWT) deployment to tomcat

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

No need to worry too much about this warning message. 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).

Following image shows the content of the gwt-user.jar, and the content of the servlet.jar is highlighted.



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.

Comments

  1. replae[e] the gwt-user.jar file with gwt-servlet.jar

    Wha? If you remove gwt-user.jar the project won't even compile - the GWTCompiler starts complaining that it's "uanble to find com/google/gwt/user/User.gwt.xml". How are you using gwt-servlet as a drop-in replacement for gwt-user?

    ReplyDelete
  2. Seems you haven't read this correctly. You need GWTCompiler only at development phase not in deployment. At deployment you only have a set of Java classes with web related files.

    This article says: "When a Google Web Toolkit (GWT) web application is deployed to Tomcat web server, you may encounter a warning message as follows". So this has nothing related to development phase. Before deployment, you should replace as explained to avoid the warning.

    If you have any issues, feel free to post here.

    ReplyDelete
  3. Thx this helped me too

    ReplyDelete
  4. IN which version of GWT the gwt-servlet.jar was changed? so that I can get the corresponding jar. Can any body help me

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

We appreciate your opinions, suggestions and criticism.

Popular posts from this blog

Web Services with Apache Axis 1.4 Tutorial: server and client sides

Java Sorting: Comparator vs Comparable Tutorial

Creative Commons License Digizol by Kamal Mettananda is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License .
URL of this page must be supplied in attribution
© 2004-2017