tags:

views:

55

answers:

1

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:

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"&gt;
<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"&gt;
<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!

A: 

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! ;)

Bogdan
In the Project Properties window ->Libaries -> Compile I added the jar, but it's still not working.Validating newly compiled units [ERROR] Errors in 'file:/F:/Documents%20and%20Settings/l/Dokumentumok/NetBeansProjects/RJ/src/java/org/rj/client/MainEntryPoint.java' [ERROR] Line 52: No source code is available for type dal.entities.Users; did you forget to inherit a required module?Thanks anyway, I keep on trying.
Oh, make sure the DAL_Hibernate jar file is build ***with*** the sources. See Project properties->Build->Packaging, Exclude from jar file. Remove "**/*.java," part.
Bogdan
I removed it but it's still not working.
Strange. I have a similar project and the only notable difference is that the "Commons.gwt.xml" file is one level deep than yours (correspondig to your "dal" folder. and of course in Main.gwt.xml would be `<inherits name="dal.Common" />`
Bogdan
And that is the solution! I don't know why, but as soon as I made a "dal" package and put the Common.gwt.xml into that folder (dal.entities is now inside dal) it worked! (Of course I rewrited the Main.gwt.xml and also the Commons.gwt.xml, which looks like this now: <source path="entities"></source>) Thank you very much! I really owe you one, I've never guessed it. Thanks again!