Problem in compiling the widgetset...

Hi all,

I found an example RPC program which was done with GWT & tried using it to pass some data between client/server.

GWT RPC example

I have implemented these needed classes & tried to compile my widgetset.

Suddenly it gave me the following exception.

Compiling widgetset com.asela.vaadin.customui.trend.widgetset.TstrendWidgetset
Updating GWT module description file...
Sep 20, 2010 5:56:23 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Widgetsets found from classpath:
	org.vaadin.henrik.refresher.RefresherApplicationWidgetset in jar:file:E:/Development/TSTrend/WebContent/WEB-INF/lib/refresher-1.0.0.jar!/
	com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:E:/Development/TSTrend/WebContent/WEB-INF/lib/vaadin-6.4.1.jar!/
	com.asela.vaadin.customui.trend.widgetset.TstrendWidgetset in file://E/Development/TSTrend/src

Done.
Starting GWT compiler
[color=#A90C0C]
Compiling module com.asela.vaadin.customui.trend.widgetset.TstrendWidgetset
   [ERROR]
 Errors in 'file:/E:/Development/TSTrend/src/com/asela/vaadin/customui/trend/widgetset/client/remote/Test.java'
      [ERROR]
 Line 10:  Rebind result 'com.asela.vaadin.customui.trend.widgetset.client.remote.MyRemoteServiceAsync' must be a class
   [ERROR]
 Cannot proceed due to previous errors
[/color]
Widgetset compilation failed

According to the tutorial,
MyRemoteServiceAsync
should be an interface. Also there’s a class (
Test
) which implements the interface too.

I have no clue why I’m getting this exception.
Any help is greatly appreciated.

Thanks in advance.
Cheers,
Asela.

PS:

Following is my
gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
	<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
	<inherits name='org.vaadin.gwtgraphics.GWTGraphics' />
	<inherits name="org.vaadin.henrik.refresher.RefresherApplicationWidgetset" />
	<servlet path="/rpc" class="com.asela.vaadin.customui.trend.remote.RemoteServiceImpl" />
</module>

And following is the relevant block of my
web.xml

<servlet>
        <servlet-name>rpc</servlet-name>
        <servlet-class>com.asela.vaadin.customui.trend.remote.RemoteServiceImpl</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>rpc</servlet-name>
        <url-pattern>/rpc</url-pattern>
    </servlet-mapping>

Hi,

Perhaps you’re saying
GWT.create(MyRemoteServiceAsync.class)
instead of
GWT.create(MyRemoteService.class)
?

Just guessing, of course, since you did not include that part of your code.

Best Regards,
Marc

Hi Marc,

Thanks for the prompt reply.
It was my mistake & you were correct.
The widgetset compiled fine after I put
GWT.create(MyRemoteService.class)
.

But when I run it, it gives me the following exception.

Requested resource [VAADIN/widgetsets/com.asela.vaadin.customui.trend.widgetset.TstrendWidgetset/rpc]
 not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

Any idea why that’s happening?
Is something wrong with my
gwt.xml
or my
web.xml
?

Thanks & regards,
Asela.

Hi,

I’m not very familiar with GWT RPC (Vaadin does not currenty use it), but it seems the RPC mechanism is making a request to
/rpc
instead of
/rpc
- and ince Vaadin is handling everything under that path (and does not know about the /rpc), you’re getting that error.

I can think of two possible ways to fix this: a) make sure the RPC mechanism calls /rpc or b) try registering the rpc servlet to /rpc

Best Regards,
Marc