Wrapper cannot find servlet class com.google.gwt.dev.shell.GWTShellServlet

211 views
Skip to first unread message

Douglas

unread,
Apr 17, 2008, 4:14:38 PM4/17/08
to Google Web Toolkit
Folks,

I am new to the GWT and I am having a bit of trouble. What I am
trying to do is to take an example the works with the GWT-compile GWT-
shell scripts and develop an ant build file so that I can deploy the
example to tomcat. Some quick info

Apache Tomcat 6.0.14
JVM 1.5.0_13-b05-241
Mac OS X 10.4.11
GWT gwt-mac-1.4.61

When I deploy my app to tomcat and access the webpage, I keep getting
the following error:

Apr 17, 2008 2:40:14 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Allocate exception for servlet shell
java.lang.ClassNotFoundException:
com.google.gwt.dev.shell.GWTShellServlet
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1358)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1204)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1083)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
806)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
129)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:613)
Apr 17, 2008 3:07:01 PM org.apache.catalina.core.StandardWrapperValve
invoke
INFO: Servlet shell is currently unavailable

Yes I know my ant file is not perfect, but I am trying to get the
application to successfully deploy to tomcat and then I will go back
and clean it up. My ant file is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<project name="gwtupload" default="compile" basedir=".">
<description>Generates Javascript for GWTApplication.</
description>

<property name="tomcat.manager.url" value="http://localhost:8080/
manager"/>
<property name="tomcat.manager.username" value="*******"/>
<property name="tomcat.manager.password" value="******"/>

<property name="gwtpath" value="/usr/local/gwt" />
<property name="targetdir" value="${basedir}/www/${app}" />
<property name="wwwdir" value="${basedir}/www"/>
<property name="srcdir" value="${basedir}/src"/>
<property name="bindir" value="${basedir}/bin"/>
<property name="lib.dir" value="${basedir}/www/WEB-INF/lib"/>
<property name="appserver.lib" value="/usr/local/tomcat/lib"/>
<property name="deploy.dir" value="/usr/local/tomcat/webapps/
gwtupload"/>
<property name="gwt.components" value="/usr/local/code/Components"/>

<property name="name" value="gwtupload"/>
<property name="app" value="com.gwtsolutions.UploadFile"/>


<path id="classpath">
<pathelement location="${gwtpath}/gwt-dev-mac.jar"/>
<pathelement location="${gwtpath}/gwt-user.jar"/>
<pathelement location="${srcdir}"/>
<pathelement location="${bindir}"/>
<pathelement location="${gwt.components}"/>

<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>

<path id="catalina-ant-classpath">
<fileset dir="${appserver.lib}">
<include name="catalina-ant.jar"/>
</fileset>
</path>

<target name="compile-gwt">
<java classname="com.google.gwt.dev.GWTCompiler" fork="true">
<classpath refid="classpath" />
<jvmarg value="-XstartOnFirstThread" />
<arg value="-out" />
<arg value="${wwwdir}" />
<arg value="${app}" />
</java>
</target>

<target name="compile" depends="compile-gwt">
<mkdir dir="${targetdir}/WEB-INF/classes"/>
<javac srcdir="${srcdir}"
destdir="${targetdir}/WEB-INF/classes"
excludes="**/client/*.java">
<classpath refid="classpath"/>
</javac>
</target>

<target name="deploy" depends="compile" description="Deploy
application">
<copy todir="${deploy.dir}" preservelastmodified="true">
<fileset dir="${wwwdir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
</project>

Does anybody notice anything stupid that I am doing?

Thanks for the help!
Doug

gregor

unread,
Apr 18, 2008, 4:27:48 PM4/18/08
to Google Web Toolkit
Hi Doug,

java.lang.ClassNotFoundException:
com.google.gwt.dev.shell.GWTShellServlet

Looks like you are copying gwt-dev-mac.jar to Tomcat instead of gwt-
servlet.jar. Also you could try building a WAR as it's easier to
control this sort of thing, e.g:

<target name="war" depends="compile, compile.gwt"
description="builds the war file">
<delete file="build/${war}"/>
<war warfile="build/${war}" webxml="WEB-INF/web.xml">
<!-- bytecode from your Java code -->
<classes dir="build" includes="**/*.class"/>
<!-- generated HTML/JavaScript plus your CSS -->
<fileset dir="build/www"
excludes="**/*.db"
/>
<!-- supplied JAR -->
<lib file="${env.GWT_HOME}/gwt-servlet.jar"/>
<lib dir="lib/sesame-2.0">
<include name="**/*.jar"/>
</lib>
</war>

then just copy the WAR file to Tomcat's deploy directory:



regards
gregor

Mr. Amit Sharma

unread,
Jun 26, 2012, 1:41:52 AM6/26/12
to google-we...@googlegroups.com, Google Web Toolkit
Hi ,
Sorry I haven't get this problem, but according to me class not found exception is causing because of the class "com.google.gwt.dev.shell.GWTShellServlet " which your compiler is looking for , is not avail to your build path....and from this link i can say , this class is present in the jar google-dev-mac, what you already used in your lib folder (please refer this link http://www.jarfinder.com/index.php/java/info/com.google.gwt.dev.shell.GWTShellServlet )...which is contradict the above post... so the problem is different ......may be you haven't properly took this lib to your build path.... even if it is showing to your eclipse project explorer window, just right click and check whether "Add to build path" is showing or not.....other reason may be ...even though it is showing ....just check its presence in WEB-INF/lib folder of your deployment directory.... 
Reply all
Reply to author
Forward
0 new messages