Lothar,
Because I had isDuplicateSsn (on server) throw SQLException, I was forced to
throw the same exception on RegistrationService, which is on client, which
does not understand server language. That was the problem.
I fixed the code to catch SQLException instead of throwing it. This works
for now, but I will probably log, then wrap it the way you suggested, and
throw it again in a format that is serializable to be sent to client.

Thanks a bunch.

Viet Pham

On Thu, Jan 8, 2009 at 10:10 AM, Pham Tran Quoc Viet <
[email protected]> wrote:

> Thanks Lothar. I'll give it a try tonight and see what happens. Thanks
> again.
> Viet Pham
>
>
> On Wed, Jan 7, 2009 at 11:55 PM, Lothar Kimmeringer 
> <[email protected]>wrote:
>
>>
>> phamtranquocviet schrieb:
>>
>> >       public boolean isDuplicateSsn(String ssn) throws SQLException
>>
>> You can't throw a SQLException from a method of a RemoteServiceServlet.
>> To be able to transport this exception to the client (where it is passed
>> as argument to the onFailure-method of the AsyncCallback, it's necessary
>> to extend it from SerializableException which SQLException clearly isn't.
>>
>> I solved it that way, that I throw a RemoteServiceException where I add
>> the stacktrace of the causing exception as String, allowing to show the
>> error in a usual way (if you want to show that much information to an
>> user) without the need to create many many different exceptions.
>>
>>
>> Regards, Lothar
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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