简体   繁体   中英

GWT RPC using classes from another project on client side

My question is similar to my previous one, but this time I included the other project to my main project (I would like to use another project classes on my client side). This is my package hierarchy:

包层次结构

The Common.gwt.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name='com.google.gwt.user.User' />
<source path="dal.entities"></source>
</module>

The Main.gwt.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="">
<inherits name="com.google.gwt.user.User"/>
<inherits name="org.rj.shared.Shared"/>
<inherits name="Common" />
<entry-point class="org.rj.client.MainEntryPoint"/>    
</module>

Thank you for any help!

Get a hold of jpa-annotations-source.jar, see comment 14 and add it to your webproject classpath (the one with GWT). This should allow the GWT compiler to "see" the sources for the imports from your entity classes which I assume is causing problems. Hope it works! ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM