I am working on a project with seperated modules . backend for admins , client for users and core for share DAO layer amongs backend and client.
backend module uses GWT and client uses Spring MVC. At backend module , core module was included by deployment assembly. My server side , DAOs are injected by Spring.
All beans(POJOs) created in core module. My problem is I would like to use these beans from core module in my gwt project (backend module) or when using RPC calls.
I tried as answers of How can share bean from external library to GWT client? question but didn't satisfy yet. I got below error
No source code is available for type com.mycom.core.business.bean.TestBean; [ERROR] Hint: 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
Here is my efforted codes ...
TestBean.java
public class TestBean {
private int id;
public final int getId() {
return id;
}
public final void setId(int id) {
this.id = id;
}
}
beans.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module>
<inherits name='com.google.gwt.user.User'/>
<source path="com.mycom.core.business.bean.TestBean"/>
</module>
Inherit beans.gwt.xml in my App.gwt.xml as <inherits name='com.mycom.backend.beans'/> . What am I missing ?
Edit: Add sample project file
Now I created and uploaded sample modules. You can download it from google-drive URL.This archive file contains both backend and core modules.
core module was created as simple java project from Eclipse IDE.
backend module was created by gwt-ecliplse plugin (2.7 gwt version and include generated codes) and add Dynamic Web Module 2.5 project faces.
Finally , I build and run with GWT-Eclipse plugin and you can check screen-shoot for
ClassPath
Source LookUp Path
Modules
Below is error log in my console
Super Dev Mode starting up
workDir: /var/folders/mt/5287l4j94jd9rfqwqdqxr9zw0000gq/T/gwt-codeserver-7296341534601698800.tmp
Loading Java files in com.mycom.backend.App.
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Finding entry point classes
Tracing compile failure path for type 'com.mycom.backend.client.Backend'
[ERROR] Errors in 'file:/Applications/springsource/workspace/backend/src/com/mycom/backend/client/Backend.java'
[ERROR] Line 41: No source code is available for type com.mycom.core.business.bean.TestBean; did you forget to inherit a required module?
[ERROR] Hint: 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
[WARN] Server class 'com.google.gwt.dev.shell.jetty.JDBCUnloader' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/Users/cataclysm/Desktop/eclipse%20(Luna)/Datas/gwt-2.7.0/gwt-dev.jar' to the web app classpath for this session
For additional info see: file:/Users/cataclysm/Desktop/eclipse%20(Luna)/Datas/gwt-2.7.0/doc/helpInfo/webAppClassPath.html