You really have a module configuration issue more than a serialization
issue. Your Workspace class isn't part of a module.

You can read more about modules here:

http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideModules

You can also search for the error message you received ("No source
code...") and you'll find that this has been discussed here a number
of times already.

You basically have to do one of two things:

1. Move the Workspace class into a package that is part of an existing
module (e.g., com.foo.client).
2. Create a module that includes the Workspace class.

I'd go with #1, since the Workspace class as you posted it isn't very
well packaged to begin with.

Hope that helps.

- Isaac


On Wed, Mar 11, 2009 at 10:59 AM, George <[email protected]> wrote:
>
> Hi,
> i'm still having this serialization issue. It would be nice if someone
> could help me out, as I still don't get whats going wrong here.
> What is causing the error? Is it the fact that the serialized class is
> not in the same package as the service? Or am i missing one of the
> special Javadoc annotations (@gwt.typeArgs), of which i thought that i
> don't need them here.
>
> Please Help me out.
>
> Regards,
> George
>
> On Mar 5, 12:52 pm, George <[email protected]> wrote:
>> Hi,
>> when i try to run my app i get the following error:
>> Line 6: No source code is available for type CBWSNS.Workspace; did you
>> forget to inherit a required module?
>> for GetWorkspacesService.java
>>
>> Here short excerpts of the involved files:
>> GetWorkspacesService.java
>>
>> package com.example.client.workspaces;
>>
>> import com.google.gwt.user.client.rpc.RemoteService;
>>
>> public interface GetWorkspacesService extends RemoteService {
>>         CBWSNS.Workspace[] getWorkspaces();                   <<<< here
>>
>> }
>>
>> and Workspace.java
>>
>> package CBWSNS;
>>
>> import com.google.gwt.user.client.rpc.IsSerializable;
>>
>> public class Workspace  implements IsSerializable {
>>
>>     private java.lang.String name;
>>     private java.lang.String id;
>>
>>     public Workspace() {
>>     }
>>
>>     public Workspace(
>>            java.lang.String name,
>>            java.lang.String id) {
>>            this.name = name;
>>            this.id = id;
>>     }
>> + getters and setters for name and id
>>
>> Does the custom datatype have to be in the same package as the
>> service? Or what is the problem?
>>
>> Thanks in Advance
>> George
> >
>

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