Sunday, August 22, 2010

GWT error - $NoServiceEntryPointSpecifiedException: Service implementation URL not specified

Note that the solution depends on the GWT version. I was using GWT 2.0+

Just ensure that service relative path is mentioned in your client service interface via annotation

An example,

public interface SampleService extends RemoteService {

If you want to understand why 
if you using older version of GWT then the annotation won't be available for you so 
here is the answer.

This is mentioned in GWT dev guide under 'Common pitfall' but i didn't read it earlier,
"When running your RPC call, development mode displays an excaption NoServiceEntryPointSpecifiedException: Service implementation URL not specified. This error means that you did not specify a @RemoteServiceRelativePath in your service interface, and you also did not manually set target path by calling ServiceDefTarget.setServiceEntryPoint()."
    Also note this one that's closely related to above one,
    "If invoking your RPC call fails with a 404 StatusCodeException, your web.xml may be misconfigured. Make sure you specified a @RemoteServiceRelativePath and that the <url-pattern> specified in your web.xml matches this value, prepended with the location of your GWT output directory within the war directory."

    For every annotation definition given above, corresponding entry for service impl should be given in web deployment descriptor i.e web.xml. As an example,




    is the (alternate) name of the sample GWT module as defined in module definition as

    <module rename-to='addressbookmain'>

    No comments:

    Post a Comment