If you want use it in client side, you must define a module in the ejb
module and in the war proyect, use it. For example:

ejb
-> MyModule.gwt.xml: In this file, you put the package where you have the
entities

war
-> MyWar.gwt.xml: There you inherit for MyModule.gwt.xml to gwt compile can
find the sources of your entities.

See
http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html

<http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html>
Juan



2011/3/31 ngspk <[email protected]>

> It is in another project (EJB Module Project).
>
> On Mar 31, 1:28 pm, Juan Pablo Gardella <[email protected]>
> wrote:
> > What is the package of entity.User ? Are you put in client package?
> >
> > Juan
> >
> > 2011/3/30 zoejules <[email protected]>
> >
> >
> >
> >
> >
> >
> >
> > > I am working with GWT 2.2, JPA, Java EE 6 Web, glassfish v3. My
> > > problem is that I receive the following error if I use my entity in an
> > > RPC call: "No source code is available for type entity.User; did you
> > > forget to inherit a required module?"
> >
> > > First I tought the problem was the annotation, but then I read that
> > > from GWT 2.0 version should be working if "The class is annotated with
> > > a JPA javax.persistence.Entity annotation". Is this mean that I don't
> > > have to have the entity class in the client?
> >
> > > Ummm, I think I just write here everything what I think is important.
> > > I have the GWT project with the following packages:
> >
> > > org.ecommunity
> > > org.ecommunity.client (and org.ecommunity.client.view)
> > > org.ecommunity.server -> and here is just a service impl.:
> > > public class ECommunityServiceImpl extends RemoteServiceServlet
> > > implements ECommunityService  {
> > >    @EJB
> > >    ECommunitySB bean;
> >
> > >    @Override
> > >    public User loginService(String username) {
> > >        return bean.getUserByUsername(username);
> > >    }
> > > }
> > > My Main.gwt.xml looks like this:
> >
> > > <module>
> > >    <inherits name="com.google.gwt.user.User"/>
> > >    <inherits name='com.google.gwt.user.theme.standard.Standard'/>
> > >    <entry-point class="org.ecommunity.client.MainEntryPoint"/>
> > >    <source path="client"/>
> > > </module>
> >
> > > And I have an EJB Module Project with the following packages: entity
> > > (in here is my User entity class) and a sessionbean (with my
> > > sessionbean).
> >
> > > What is the problem? Do I miss something?
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

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