Krt_Malta
Krt_Malta

Reputation: 9465

Import package problem in GWT

I'm developing an app using GWT Eclipse plug-in. (I'm also using GWT Designer but I don't think the problem is here). Previously when I wanted a java application to communicate with a web service I created, I produced the "skeleton" classes from the WSDL url using Sun's wsimport tool. Then I would add the classes generated to a class folder in my Eclipse project. All worked well.

However this doesn't seem to be working with GWT. I have these:

VideoTutorialServiceService service = new VideoTutorialServiceService();
VideoTutorialService port = service.getVideoTutorialServicePort();

and I have VideoTutorialServiceService and VideoTutorialService underlined in red, the error saying videotutorialservice.VideoTutorialServiceService can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly.

.... I googled about it but I got confused. I'm a beginnier in GWT. How can I resolve this please?

Thanks and regards, Krt_Malta

Upvotes: 1

Views: 2171

Answers (4)

Jla
Jla

Reputation: 11374

The problem probably does come from the GWT Designer. See these discussions on GWT Google groups : GWT Designer errors in Eclipse and Cannot found source in GWT Project.

You can ever uninstall GWT Designer plugin ^^ or change the settings :

In WindowBuilder > GWT > Builder
Uncheck the Check for "client" classpath option

Upvotes: 3

Kibet Yegon
Kibet Yegon

Reputation: 2833

I also had a similar problem, I have a GWT 2.0 app which I have integrated it with spring-security and hibernate. Before I installed GWT Designer it worked okay. Then after installing it, I had this error on Eclipse org.springframework.orm.hibernate3.support.HibernateDaoSupport can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly. Then I tried uninstalling GWT Designer and the error was gone. I don't know if this is a bug with GWT designer because In my eclipse class path, I had added the appropriate jar files.

Upvotes: 0

Sripathi Krishnan
Sripathi Krishnan

Reputation: 31528

Are VideoTutorialServiceService etc. wsimport generated files? If yes, then they won't work with GWT.

GWT doesn't support all java classes. It just supports a sub-set that makes sense in the javascript world. Remember that GWT is essentially a java -> javascript compiler, so you can't take any java code and expect it to run properly in javascript.

Upvotes: 0

James
James

Reputation: 1

Check the capitalization of the VideoTutorialServiceService enclosing class. If you copied/pasted it verbatim then it's looking for videotutorialservice.VideoTutorialServiceService instead of VideoTutorialService.VideoTutorialServiceService

Upvotes: 0

Related Questions