2

My project contains 2 source folder, one is generic J2EE application another is smartCleintGWT,

I want to use some already existing DTO classes from first source folder (src)

Note that class used on client side and on server side of GWT project!

When I do that I getting error

[ERROR] Errors in 'file:/C:/..Projects/Admin/DMX/src_console/com/ho/nod/client/AdminRPC.java'
[ERROR] Line 7: No source code is available for type com.dmx.synch.server.descriptors.DMXLicense; did you forget to inherit a required module?

Source is available obviously; is there any way to import all that into GWT?

PS In the future 2 source folder will be separated into 2 projects...I hope it wont be that complicated as well.

3 Answers 3

1

You can find in the good docs:

Modules can specify which subpackages contain translatable source, causing the named package and its subpackages to be added to the source path. Only files found on the source path are candidates to be translated into JavaScript, making it possible to mix client-side and server-side code together in the same classpath without conflict. When module inherit other modules, their source paths are combined so that each module will have access to the translatable source it requires.

To add another subpackage add <source path="package"/> in your host file (*.gwt.xml). From the log you posted, it seems you have to add source from the com.dmx.synch.server package.

Sign up to request clarification or add additional context in comments.

Comments

0

Most RPC problems are related to Serializablity of the DTO in question, can you need to ensure that the classes have default constructor and also check if the Module definition file i.e. .gwt.xml file has source element pointing to these packages.

Comments

0

GWT only looks for source code in the client package by default, so if you have added new packages you must specify this in your *.gwt.xml file. Add something like: source path='your_top_dir' in XML format.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.