1. #1
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default GXT 1.2.4 RPC Issue With Serialization

    GXT 1.2.4 RPC Issue With Serialization


    I am trying to serialize a class that extends BaseModel and it fails with the following error:

    ...
    [java.without.input] com.google.gwt.user.client.rpc.SerializationException: Type '....PositionStatus' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.

    My model has an attribute (with getter and setter) that is a List<PositionStatus> where PositionStatus is a class that implements serializable.

    I am using the following frameworks,

    JDK 1.5_06
    GWT 1.5.3
    GXT 1.2.4

    I do not understand why GWT is complaining about serializing this class since I use explicit generic definitions in my method, as in,

    Snippet from PositionModel that extends BaseModel,

    public void setPositionStatus(List<PositionStatus> positionStatus) {
    set(POSITION_STATUS, positionStatus);
    }

    public List<PositionStatus> getPositionStatus() {
    return get(POSITION_STATUS);
    }

    I really need some direction on why I'm getting this error. I should be able to serialize the PositionModel class with a definition above without using the typearg specification.

    J

  2. #2
    Ext User
    Join Date
    Jan 2009
    Posts
    8
    Vote Rating
    0
    SJrX is on a distinguished road

      0  

    Default


    I've had this problem too, the short answer is to add a member variable to a class that is being serialized (defined in your GWT RPC Interface), with a type of PositionStatus.

    class PositionModel {

    //Not used, only for GWT Serialization
    private PositionStatus = null;

    }.

    As best I can tell in order to minimize compile time, GWT will only compile serializers for classes defined in the RPC interfaces, in order to serialize those all the member functions need to be serialized. I haven't tried it but I bet List<PositionStatus> woulld work too. The problem with EXT GWT is that the Maps they use all contain Objects, and really anything could go in there. When GWT looks at the method, it does see it, but as far as it can tell it doesn't affect the object itself, so can be ignored.

  3. #3
    Ext User
    Join Date
    Apr 2009
    Posts
    14
    Vote Rating
    0
    jcorbin is on a distinguished road

      0  

    Default RE: Thanks

    RE: Thanks


    Thank you for the feedback. At this point I'll try anything to get the serialization working.

    J

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Posts
    6
    Vote Rating
    0
    SmallerPlatypus is on a distinguished road

      0  

    Default


    Quote Originally Posted by SJrX View Post
    I've had this problem too, the short answer is to add a member variable to a class that is being serialized (defined in your GWT RPC Interface), with a type of PositionStatus.

    class PositionModel {

    //Not used, only for GWT Serialization
    private PositionStatus = null;

    }.

    As best I can tell in order to minimize compile time, GWT will only compile serializers for classes defined in the RPC interfaces, in order to serialize those all the member functions need to be serialized. I haven't tried it but I bet List<PositionStatus> woulld work too. The problem with EXT GWT is that the Maps they use all contain Objects, and really anything could go in there. When GWT looks at the method, it does see it, but as far as it can tell it doesn't affect the object itself, so can be ignored.
    +1 this worked for me too

  5. #5
    Ext User
    Join Date
    Jan 2010
    Posts
    1
    Vote Rating
    0
    johnny192010 is on a distinguished road

      0  

    Question Please help

    Please help


    I have a related problem that I havent fix yet and do not completely understand.Please help me. Below are the details:

    public class EmployeeList extends LightEntity implements IsSerializable
    {
    private static final long serialVersionUID = 1L;
    private int emp_id;
    private String firstname;
    private String lastname;
    private double total_consumption;
    public EmployeeList()
    {
    }
    public EmployeeList(int emp_id, String firstname, String lastname,
    double total_consumption)
    {
    this.emp_id = emp_id;
    this.firstname = firstname;
    this.lastname = lastname;
    this.total_consumption = total_consumption;
    }
    public int getEmpID()
    {
    return emp_id;
    }
    public void setEmpID(int emp_id)
    {
    this.emp_id = emp_id;
    }
    public String getFirstname()
    {
    return firstname;
    }
    public void setFirstname(String firstname)
    {
    this.firstname = firstname;
    }
    public String getLastname()
    {
    return lastname;
    }
    public void setLastname(String lastname)
    {
    this.lastname = lastname;
    }
    public double getTotalConsumption()
    {
    return this.total_consumption;
    }
    public void setTotalConsumption(int total_consumption)
    {
    this.total_consumption = total_consumption;
    }
    }


    In the Service Implementation class:
    @Override
    public List generateReport(String reportItem, String positionItem)
    {
    List employeeList =
    coDBManager.generateEmployeeReport(reportItem, positionItem);
    return employeeList;
    }


    In my DBManager class:
    public List generateEmployeeReport(String reportItem, String reportPosition)
    {
    Session session =
    MyHibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    StringBuffer sql = new StringBuffer();
    sql.append(”select employee.emp_id, employee.lastname, employee.firstname, ” +
    “(select sum(itemdetails.amount) from Item item, ItemDetails itemdetails ” +
    “where item.emp_id=employee.emp_id and item.id = itemdetails.itemid) as total_consumption ” +
    “from Employee employee”);
    Query query = null;
    List result = null;
    try
    {
    query = session.createQuery(sql.toString());
    result = query.list();
    session.getTransaction().commit();
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    return result;
    }


    ERROR:
    [WARN] Exception while dispatching incoming RPC call
    com.google.gwt.user.client.rpc.SerializationException: java.lang.reflect.InvocationTargetException
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:696)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:659)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponse(RPCCopy_GWT16.java:597)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponseForSuccess(RPCCopy_GWT16.java:429)
    at com.google.gwt.user.server.rpc.RPCCopy.encodeResponseForSuccess(RPCCopy.java:193)
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:157)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
    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:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    Caused by: java.lang.reflect.InvocationTargetException: null
    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.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:678)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:659)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponse(RPCCopy_GWT16.java:597)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponseForSuccess(RPCCopy_GWT16.java:429)
    at com.google.gwt.user.server.rpc.RPCCopy.encodeResponseForSuccess(RPCCopy.java:193)
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:157)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
    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:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
    Caused by: com.google.gwt.user.client.rpc.SerializationException: Type ‘[Ljava.lang.Object;’ was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.
    at com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize(StandardSerializationPolicy.java:83)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    at com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:43)
    at com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:36)
    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.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer(ServerSerializationStreamWriter.java:678)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:659)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:593)
    at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponse(RPCCopy_GWT16.java:597)
    at com.google.gwt.user.server.rpc.RPCCopy_GWT16.encodeResponseForSuccess(RPCCopy_GWT16.java:429)
    at com.google.gwt.user.server.rpc.RPCCopy.encodeResponseForSuccess(RPCCopy.java:193)
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:157)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
    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:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi