GWT + Entity Bean

16 views
Skip to first unread message

Bálint Kriván

unread,
Sep 13, 2008, 12:30:42 PM9/13/08
to Google Web Toolkit
Hi!

I'm having an issue, and I hope someone can help me, because GWT looks very great.

So I've started to make a very simple application.
I have an EJB package which contains the Session Beans and the Entity Beans.
In the WAR project I've set up the GWT:
I've created an Entry Point and a Service (RPC call) - In the implemented RemoteServiceServlet I can use the Session Beans, which is connected to Entity Beans. So I can make new objects to the database. It works fine.

But I would like to be able to retrieve objects as well, so I've created a retrieve call aswell to this Service, and the returned value should be List<hu.krivan.model.Topic> (Topic is my Entity Bean).
But when I want to compile my project, it says that:
[ERROR] Errors in 'file:/home/balint/NetBeansProjects/GWTForum/GWTForum-war/src/java/hu/krivan/client/service/TopicService.java'
[ERROR] Line 20: No source code is available for type hu.krivan.model.Topic; did you forget to inherit a required module?

(This is in Line 20:
public List<Topic> retrieveTopics();
)

TopicService is my interface which implements RemoteService. How can I use my List<Topic> in the UI (so I would like to build a FlexTable based on these Topic objects.)

Very thanks for your help!

Regards,
Kriván Bálint

Len

unread,
Sep 14, 2008, 3:15:33 PM9/14/08
to Google-We...@googlegroups.com
Hi

GWT needs to be able to see the source of your entities so you need to
include them in the GWT compile. To do this create a module xml file
in the server package that contains a <src ="entityDir"> statement
where entityDir is your directory containing the entity classes. Then
include this module in your main module.

Len

2008/9/13 Bálint Kriván <bal...@krivan.hu>:
Reply all
Reply to author
Forward
0 new messages