This has been traced to "Issue 4460:    RPC fails to locate custom field
serializers in some application servers"
http://code.google.com/p/google-web-toolkit/issues/detail?id=4460

On Jan 15, 7:37 am, wytten <[email protected]> wrote:
> I am also having serialization issues after upgrading from 1.5.3 to
> 2.0.0
>
> We use BigDecimal thanks to gwt-math 2.1.  We do not use BigInteger,
> however after upgrading to GWT 2.0.0 our app is broken because
> BigInteger is not on the whitelist.  If I force it onto the whitelist
> using the technique described here, the problem changes to:
>
> com.google.gwt.user.client.rpc.SerializationException: Type '[I' 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 =
> [...@723358
>
> Any idea where I should look next?
>
> Thanks.
>
> On Nov 22 2009, 4:17 am, felix <[email protected]> wrote:
>
>
>
> > Hi,
>
> > i had the same troubles in my project once i moved from 1.5.2 to
> > 2.0m2. I found the following solution:
>
> > 1. create a class on the client code:
>
> > public class SerializableWhiteList implements IsSerializable {
> >         @SuppressWarnings("unused")
> >         private MyBean myBean;
> >         @SuppressWarnings("unused")
> >         private MySecondBean mySecondBean;
> >         // Put here all Beans wich need this special treatment
>
> > }
>
> > 2. Create a Method in your Service and ServiceAsync and ServiceImpl:
>
> > public interface MyService extends RemoteService {
> >         public SerializableWhiteList serializableWhiteList
> > (SerializableWhiteList s);}
>
> > public interface MyServiceAsync {
> >         public void serializableWhiteList(SerializableWhiteList s,
> > AsyncCallback<SerializableWhiteList> cb);}
>
> > public class MyServiceImpl extends RemoteServiceServlet implements
> > MyService {
> >         @Override
> >         public SerializableWhiteList serializableWhiteList
> > (SerializableWhiteList s) {
> >                 throw new RuntimeException("This Method is only used to put 
> > Beans to
> > the SerializationPolicy, please do not call it");
> >         }
>
> > }
>
> > Greetings
>
> > On Nov 16, 4:51 am, Edgenius <[email protected]> wrote:
>
> > > It is not new questions in this group. But I face a new problem in
> > > 2.0M2 as SerializationPolicy logic is changed.  I know GWT will put
> > > serializition class into SerializationPolicywhitelist. Before 2.0, I
> > > create a dummy method which hold all classes I want to pass to client
> > > side but they are not inside any method's  parameters or exceptions.
> > > It looks:
>
> > > public interface RemoteServiceAsync {
> > > public void serialPolicy(ClientAuthenticationException
> > > ae,ClientAccessDeniedException ade, CaptchaVerifiedException ce
> > >                         TextModel textModel,LinkModel linkModel, 
> > > MessageListModel mlm,
> > > AsyncCallback<Object> callback);
> > >                         }
>
> > > These Exception classes are a kind of "runtime exception" - For
> > > example, ClientAuthenticationException is thrown when login failed.
> > > It won't be checked exception as almost all methods have the
> > > possibilty to throw this exception. It is bad to write on every method
> > > like "int myMethod() throws ClientAuthenticationException.
>
> > > I guess 2.0 becomes smarter - it can distinguish the unused method and
> > > kick out my runtime exceptions classes from SerializationPolicy
> > >whitelist.  Unfortunately, it brings troubles as well.  So, do we have
> > > an easy to way to expandwhitelist?

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

Reply via email to