hi!

No my classes have a no arguments constructors. There are just defined in
another project. The GWT project uses it from a jar file.

Thanks

On Wed, Dec 23, 2009 at 12:34 PM, Dan <daniel.vaug...@gmail.com> wrote:

> Is this the problem with the classes you want to serialize not having
> a no arguments constructor?
>
> On Nov 21, 11:56 pm, "Oleg K." <seq...@gmail.com> wrote:
> > Hi all.
> >
> > I have the following problem.
> >
> > My project tries to use GWT RPC.
> >
> > It has one jar in dependency libs which contain several model classes.
> > All of that classes implements Serializable and IsSerializable
> > interfaces (one of that classes is CHAttrGroup). That jar also
> > includes .java files with source code and Module.gwt.xml file so that
> > model classes can be used in main GWT application by including
> > <inherits name="...." />.
> >
> > GWT compiler (2.0-rc1) doesn't write error messages when building
> > application and all that model classes (e.g. CHAttrGroup) work
> > correctly in client-side code (like other gwt client classes). But
> > when I try to send objects of that class from server to client I get
> > following exception:
> >
> > 2009-11-22 02:34:49.688:tasktrackgwt: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.seriali
> zeWithCustomSerializer
> > (ServerSerializationStreamWriter.java:760)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> zeImpl
> > (ServerSerializationStreamWriter.java:723)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> ze
> > (ServerSerializationStreamWriter.java:612)
> >         at
> >
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write
> Object
> > (AbstractSerializationStreamWriter.java:129)
> >         at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
> > $ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> zeValue
> > (ServerSerializationStreamWriter.java:534)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> zeClass
> > (ServerSerializationStreamWriter.java:700)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> zeImpl
> > (ServerSerializationStreamWriter.java:730)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> ze
> > (ServerSerializationStreamWriter.java:612)
> >         at
> >
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write
> Object
> > (AbstractSerializationStreamWriter.java:129)
> >         at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
> > $ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> zeValue
> > (ServerSerializationStreamWriter.java:534)
> >         at
> com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:607)
> >         at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess
> > (RPC.java:465)
> >         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> > (RPC.java:562)
> >         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> > (RemoteServiceServlet.java:188)
> >         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost
> > (RemoteServiceServlet.java:224)
> >         at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost
> > (AbstractRemoteServiceServlet.java:62)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> >         at com.google.inject.servlet.ServletDefinition.doService
> > (ServletDefinition.java:216)
> >         at com.google.inject.servlet.ServletDefinition.service
> > (ServletDefinition.java:141)
> >         at com.google.inject.servlet.ManagedServletPipeline.service
> > (ManagedServletPipeline.java:93)
> >         at com.google.inject.servlet.FilterChainInvocation.doFilter
> > (FilterChainInvocation.java:63)
> >         at com.google.inject.servlet.ManagedFilterPipeline.dispatch
> > (ManagedFilterPipeline.java:122)
> >         at
> com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
> > 110)
> >         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1157)
> >         at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:388)
> >         at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >         at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:182)
> >         at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:765)
> >         at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 418)
> >         at org.mortbay.jetty.handler.ContextHandlerCollection.handle
> > (ContextHandlerCollection.java:230)
> >         at org.mortbay.jetty.handler.HandlerCollection.handle
> > (HandlerCollection.java:114)
> >         at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:152)
> >         at org.mortbay.jetty.Server.handle(Server.java:326)
> >         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 536)
> >         at org.mortbay.jetty.HttpConnection$RequestHandler.content
> > (HttpConnection.java:930)
> >         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
> >         at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> >         at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
> >         at org.mortbay.io.nio.SelectChannelEndPoint.run
> > (SelectChannelEndPoint.java:409)
> >         at org.mortbay.thread.QueuedThreadPool$PoolThread.run
> > (QueuedThreadPool.java:582)
> > Caused by: java.lang.reflect.InvocationTargetException
> >         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.seriali
> zeWithCustomSerializer
> > (ServerSerializationStreamWriter.java:742)
> >         ... 42 more
> > Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
> > 'ru.codehouse.tasktrack.model.objects.CHAttributeGroup' 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.: instance =
> > ru.codehouse.tasktrack.model.objects.CHAttributeGroup[id=10]
> >         at
> >
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> ze
> > (ServerSerializationStreamWriter.java:610)
> >         at
> >
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write
> Object
> > (AbstractSerializationStreamWriter.java:129)
> >         at
> >
> com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSeriali
> zerBase.serialize
> > (Collection_CustomFieldSerializerBase.java:43)
> >         at
> >
> com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializ
> er.serialize
> > (ArrayList_CustomFieldSerializer.java:36)
> >         ... 47 more
> >
> > GWT serialization policy file contains following line:
> >
> > ru.codehouse.tasktrack.model.objects.CHAttribute, false, false, true,
> > true, ru.codehouse.tasktrack.model.objects.CHAttribute/3607536941,
> > 3607536941
> >
> > which tells us that field and instant serialization is not permitted
> > (first, and second 'false's) and that field and instance
> > deserialization is permitted (3rd and 4th 'true's).
> >
> > How can I enable serialization of my model objects ?
>
> --
>
> 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<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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