Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

cannot load RPC service interface from external jar

41 views
Skip to first unread message

HeyHei

unread,
Apr 28, 2012, 9:22:58 PM4/28/12
to google-we...@googlegroups.com
I make a jar file which contain client side code and a RPC service, serviceAsync interface.
After that, I create an new GWT project and create a RemoteServiceServlet that implements the RPC service in the external jar but there are some error message when I start the dev server:

java.lang.NoClassDefFoundError: xxx/client/XXXService

p.s. I have create a gwt.xml file in the jar:

<module><source path="client"></source></module>

and add line to gwt.xml in new project:

<inherits name='xxx/client/XXX'/>

mukarev

unread,
May 5, 2012, 12:30:47 PM5/5/12
to google-we...@googlegroups.com
Hi HeyHei,

did you specify the remote servlet in your web.xml?

Notice that every servlet has to be mapped there (war/WEB-INF/web.xml) - example like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

<web-app>
  
  <!-- Servlets -->
  <servlet>
    <servlet-name>MyServlet</servlet-name>
    <servlet-class>org.my.servlet.class</servlet-class>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>MyServlet</servlet-name>
    <url-pattern>/folder/path</url-pattern>
  </servlet-mapping>
  
  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>myapp.html</welcome-file>
  </welcome-file-list>

</web-app>

Hope that helps.

Greetz,
muakrev
Reply all
Reply to author
Forward
0 new messages