Hi I am trying to use the service layer of GWT 2.1.1. I have created
the infrastracture meaning:
1. An entity proxy, entity and entity locator
2. A request, a service and a service locator
I am using an interface which I annotate as service, and which I
implement. Everything works ok, except that of the persist and
probably remove methods. The problem is that, I cannot have access to
the object that is going to be saved, because I need to have access to
the instance that will be saved. When I tried to, I am getting the
following error:
ERROR] Could not invoke method persist
java.lang.IllegalArgumentException: object is not an instance of
declaring class
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
        at
com.google.gwt.requestfactory.server.ReflectiveServiceLayer.invoke(ReflectiveServiceLayer.java:
164)
        at
com.google.gwt.requestfactory.server.ServiceLayerDecorator.invoke(ServiceLayerDecorator.java:
89)
        at
com.google.gwt.requestfactory.server.ServiceLayerDecorator.invoke(ServiceLayerDecorator.java:
89)
        at
com.google.gwt.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:
440)
        at
com.google.gwt.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:
218)
        at
com.google.gwt.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:
125)
        at
com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:
118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)

When I am debugging, I can see that the problem is that in the
ServiceLayerDecorator.invoke(Method domainMethod, Object... args) it
gets the domain method right, it is the persist method of the service
interface, but in the arguments it refers to the entity DAO. So what
to do? I should extend the ServiceLayerDecorator, trying to make the
invoke method to get the right parameters, or I should try some other
solution. Can someone help please?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to