0

i am in this situation:

@RemoteServiceRelativePath("create_event")
public interface CreateEventService extends RemoteService {
    String[] createeventServer(LinkedList<LinkedList<String>> input) throws IllegalArgumentException;
}


public interface CreateEventServiceAsync {
    void createeventServer(LinkedList<LinkedList<String>> input, AsyncCallback<String[]> callback)
            throws IllegalArgumentException;
}


public class CreateEventServiceImpl extends RemoteServiceServlet implements CreateEventService {
    public String[] createeventServer(LinkedList<LinkedList<String>> input) throws IllegalArgumentException {
        String[] arr = new String[2];
        ...
        return arr;
}

Why does this cause error "The response could not be deserialized"?

p.s. I have tried to execute the project with app engine and without it, but the problem is the same.

suprasad
  • 1,411
  • 3
  • 18
  • 40
Karmagy
  • 141
  • 1
  • 1
  • 10
  • Can you include the method createeventServer from CreateEventService in your post. – Momo Apr 08 '14 at 15:44
  • Are you using app engine? More code and information is needed to help you. – slugmandrew Apr 08 '14 at 15:57
  • Read [GWT: The response could not be deserialized](http://stackoverflow.com/questions/8943147/gwt-the-response-could-not-be-deserialized) – Braj Apr 08 '14 at 16:11
  • i have tried to execute the project with app engine and without it, but the problem is the same. – Karmagy Apr 08 '14 at 17:39

1 Answers1

0

To problems with serializable objects, you can try this check list:

  1. Verify that the class has a default constructor (without arguments)
  2. Verify that the class implements Serializable or IsSerializable or implements an Interface that extends Serializable or extends a class that implement Serializable
  3. Verify that the class is in a client.* package or …
  4. Verify, if the class is not in client.* package, that is compiled in your GWT xml module definition. By default is present. If your class is in another package you have to add it to source. For example if your class is under domain.* you should add it to xml as . Be aware that the class cannot belong to server package! More details on GWT page: http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
  5. If you are including the class from another GWT project you have to add the inherits to your xml module definition. For example if your class Foo is in the package com.dummy.domain you have to add to the module definition. More details here: http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideInheritingModules
  6. If you are including the class from another GWT project released as a jar verify that the jar contains also the source code because GWT recompile also the Java source for the classes passed to the Client.

Font: http://isolasoftware.it/2011/03/22/gwt-serialization-policy-error/

HenioJR
  • 604
  • 1
  • 10
  • 17