Deprecated SerializableException

37 views
Skip to first unread message

rjcarr

unread,
Dec 9, 2009, 6:13:23 PM12/9/09
to Google Web Toolkit
I'm attempting to upgrade to GWT 2.0 and everything is working well
enough except I am getting this warning in the compile step:

Referencing deprecated class
'com.google.gwt.user.client.rpc.SerializableException'

And the file it mentions is a gwt derived file with the suffix:
_TypeSerializer.java

The warning always happens on service classes (i.e., RemoteService),
but doesn't seem to happen on *all* service classes.

I have not defined SerializableException explicitly, but my method
signatures do throw Exception.

Any idea why this is happening and what I can do to make it go away?

Thanks!

Jim Douglas

unread,
Dec 9, 2009, 6:23:38 PM12/9/09
to Google Web Toolkit
I've been wondering about that too....

Compiling module com.basis.bbj.web.gwt.GWTWebClient
Scanning for additional dependencies: file:/Users/jimdouglas/
Documents/Eclipse/trunk/src/com/basis/bbj/web/gwt/client/
GWTWebClient.java
Adding '445' new generated units
Validating newly compiled units
[WARN] Warnings in 'generated://
06C3F30160AF1831220B54CE123ABF82/com/basis/bbj/web/gwt/client/
GWTRPCServlet_TypeSerializer.java'
[WARN] Line 2058: Referencing deprecated class
'com.google.gwt.user.client.rpc.SerializableException'
See snapshot: /var/folders/r7/r7M+NJ2RGY40D1IA70pkS+++
+TI/-Tmp-/GWTRPCServlet_TypeSerializer1968920803024545942.java
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into /Users/jimdouglas/Documents/Eclipse/trunk/war/
gwtwebclient.
Link succeeded
Compilation succeeded -- 101.682s

piyush sharma

unread,
Dec 10, 2009, 1:01:29 AM12/10/09
to google-we...@googlegroups.com
--

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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Gabor

unread,
Dec 10, 2009, 5:31:28 AM12/10/09
to Google Web Toolkit
If your method throws Exception, or a custom class that extends
Exception, then you will get this warning. Maybe because the GWT
compiler searches for all subclasses of Exception, and finds
SerializableException. It includes it in the list of serializable
types, and you get a deprecation warning. I don't know how to make it
go away, without going back to 1.7.

Jim Douglas

unread,
Dec 10, 2009, 2:47:24 PM12/10/09
to Google Web Toolkit
> a custom class that extends Exception

That must be it; we have a couple of custom classes that just extend
Exception:

./InitializationException.java:public class InitializationException
extends Exception
./RPCException.java:public class RPCException extends Exception

Would we be better off using one of the Exception types that GWT
emulates? Or is this just an annoying-but-harmless warning?

Robert J. Carr

unread,
Dec 10, 2009, 2:56:20 PM12/10/09
to google-we...@googlegroups.com
Actually, I tend to *only* use Exception for my remote service methods
and I still get the warning.

Brian Dorry

unread,
Dec 12, 2009, 11:15:57 AM12/12/09
to Google Web Toolkit
Has anyone found a solution to this? I haven't experienced any runtime
problems ignoring these messages but I'd like to follow a newer
standard if it exists.

On Dec 10, 2:56 pm, "Robert J. Carr" <rjc...@gmail.com> wrote:
> Actually, I tend to *only* use Exception for my remote service methods
> and I still get the warning.
>

vova

unread,
Dec 14, 2009, 7:56:29 AM12/14/09
to Google Web Toolkit
Your methods should throw SerializationException agains Exception.
Reply all
Reply to author
Forward
0 new messages