Seam + GWT 1.7?
wilth Oct 22, 2009 11:18 AMHello,
I'm trying to connect a GWT frontend with Seam as described here (http://docs.jboss.org/seam/2.1.2/reference/en-US/html/gwt.html) using GWT 1.7.1.
However, accessing the method I get:
Exception while dispatching incoming RPC call java.lang.SecurityException: Unable to access a service method called \[greetServer\] on class \[server.gwt.GreetingServiceImpl\] without the @WebRemote attribut e. This may be a hack attempt, or someone simply neglected to use the @WebRemote attribute to indicate a method as remotely accessible.
The method itself is annotated with @WebRemote. This is the message I get with Seam 2.1.2 CR2 when I'm including jboss-seam.jar, jboss-seam-remoting.jar from Seam and gwt-servlet.jar from GWT 1.7.1. Now if I use the gwt-servlet.jar that Seam provides, I get the following exception:
Exception while dispatching incoming RPC call java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:617) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:432) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamReader.java:38) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:383) at org.jboss.seam.remoting.gwt.GWTService.processCall(GWTService.java:200)
Which is probably due to the GWT application being developed in GWT 1.7.1, I guess.
I finally tried with jboss-seam.jar, jboss-seam-remoting.jar from Seam 2.2.0 GA and the result is:
ERROR An IncompatibleRemoteServiceException was thrown while processing this call. com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser. ( Blocked attempt to access interface 'gwt.client.GreetingService', which doesn't extend RemoteService; this is either misconfiguration or a hack attempt ) at org.jboss.seam.remoting.gwt.GWTService.RPC\_decodeRequest(GWTService.java:400)
So is it not possible to use GWT 1.7.1 with Seam? Am I doing something wrong? Which version of GWT would work with Seam 2.1.2 CR2?
Thanks a lot!