Q:

GWT RPC Service Allocate exception for servlet

I'm trying to create a simple RPC service that blows up with the following error message : 
[tomcat:launch] Apr 3, 2013 12:50:38 AM org.apache.catalina.core.ApplicationContext log
[tomcat:launch] INFO: Marking servlet SummaryBuilderServiceImpl as unavailable
[tomcat:launch] Apr 3, 2013 12:50:38 AM org.apache.catalina.core.StandardWrapperValve invoke
[tomcat:launch] SEVERE: Allocate exception for servlet SummaryBuilderServiceImpl
[tomcat:launch] java.lang.ClassCastException: com.test.server.SummaryBuilderServiceImpl cannot be cast to javax.servlet.Servlet
[tomcat:launch]     at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1149)
[tomcat:launch]     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
[tomcat:launch]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
[tomcat:launch]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[tomcat:launch]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
[tomcat:launch]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
[tomcat:launch]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[tomcat:launch]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
[tomcat:launch]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
[tomcat:launch]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
[tomcat:launch]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
[tomcat:launch]     at java.lang.Thread.run(Thread.java:662)
[tomcat:launch] Apr 3, 2013 12:53:32 AM org.apache.catalina.core.StandardWrapperValve invoke
[tomcat:launch] INFO: Servlet SummaryBuilderServiceImpl is currently unavailable

My web.xml has the following mappings
 <!--  Summary Builder Service -->
    <servlet>
        <servlet-name>SummaryBuilderServiceImpl</servlet-name>
        <servlet-class>com.test.server.SummaryBuilderServiceImpl</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>SummaryBuilderServiceImpl</servlet-name>
        <url-pattern>/test/SummaryBuilder</url-pattern>
    </servlet-mapping>

The service files are 
@RemoteServiceRelativePath("SummaryBuilder")
public interface SummaryBuilderService extends RemoteService {
    String sayHelloWorld();
}

and the async version
public interface SummaryBuilderServiceAsync {
    void sayHelloWorld(AsyncCallback<String> hello);
}

and the implementation
public class SummaryBuilderServiceImpl implements SummaryBuilderService {
    @Override
    public String sayHelloWorld() {
        return "Hello World";
    }
}

I'm invoking it in the entry point like
final SummaryBuilderServiceAsync summaryBuilderService = GWT.create(SummaryBuilderService.class);

        summaryBuilderService.sayHelloWorld(new AsyncCallback<String>() {

            @Override
            public void onSuccess(String arg0) {
                Window.alert(arg0);

            }

            @Override
            public void onFailure(Throwable arg0) {
                arg0.printStackTrace();
                Window.alert("Failed to create servlet");

            }
        });

A:

You forgot to extend the RemoteServiceServlet , this makes your impl class a servlet.
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class SummaryBuilderServiceImpl extendes 
                       RemoteServiceServlet implements SummaryBuilderService {
    @Override
    public String sayHelloWorld() {
        return "Hello World";
    }
}

How to make an GWT server call(GWT RPC?)

