This produces a WARNing, your code will / should still run.
The ERROR might be related to this in someway, but I have just written
some test code & the basic process you describe works fine for me.
Maybe you just need to give the JVM more memory.
I usually just return a regular array [] rather than ArrayList - this
avoids problems of this kind.
-------------------------------------------------------------------------------------------------------------------------------------
More details:
The GWT compiler uses the information in the client interface to help
it decide how to do the serialization.
Since GWT 1.4.6 does not support 'generics' the GWT compiler does not
know what type of objects are in your ArrayList, so it cannot produce
the optimal serialization code.
As jkc mentions the @gwt.typeArgs annotation is supposed to help with
this.
I take a different approach, if I produce an ArrayList on the server
to be sent to the client, I define the method to return a regular
array, and use .toArray() on my ArrayList in the return statement.
So I might have a remote method interface which contains : public
String[] getList();
On the server the implementation is :
public String[] getList()
{
ArrayList<String> list = new ArrayList<String>();
list.add("abc");
list.add("def");
return list.toArray(new String[0]);
}
I hope this help.
Please post something if/when you get this fixed, I would be
interested to know what happens.