I have a java application that I made and this week I tried to add GWT to it.
I get this error when trying to see my class in GWT Designer:
Error loading module(s).
GWT Designer can't load a module because of error in gwt.xml module description, incorrect resource which requires processing with GWT generator or by some other configuration error.
Please check your $project_dir/.gwt/.gwt-log for GWT-specific errors (not GWT Designer errors).
This log has the following error messages:
[ERROR] Errors in 'file:/C:/Temp/essd/Projecto/anacom/src/main/java/anacom/shared/dto/OutputObterModoDto.java'
[ERROR] Line 8: No source code is available for type anacom.domain.Modo; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/Temp/essd/Projecto/anacom/src/main/java/anacom/shared/dto/TelemovelDetalhadoDto.java'
[ERROR] Line 8: No source code is available for type anacom.domain.Modo; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/Temp/essd/Projecto/anacom/src/main/java/anacom/shared/exception/TelemovelModoException.java'
[ERROR] Line 17: No source code is available for type anacom.domain.Modo; did you forget to inherit a required module?
[ERROR] Errors in 'file:/C:/Temp/essd/Projecto/anacom/src/main/java/anacom/shared/dto/OutputObterModoDto.java'
[ERROR] Line 8: No source code is available for type anacom.domain.Modo; did you forget to inherit a required module?
[ERROR] Unable to find type 'anacom.presentationserver.client.AnacomGWT'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[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
All the files that have that error have the import of the class anacom.domain.Modo. That class is an enum, that only contains this:
package anacom.domain;
public enum Modo {
LIGADO, DESLIGADO, OCUPADO, SILENCIO
}
Also, in the gwt.xml I inherit the module and define the entrypoint class.
I’ve spent the last three days trying to work this out. If you could help me I would appreciate. Sorry if this is a newbie question but in my search through the web I have not found a solution. Thank you so much!
Well I managed to find a solution. Not what I expected but it solves this.
I moved the enum class to another package; the DTOs and the exceptions are under the package shared and then in their respective folders. I created, under shared, a domain folder. Then I altered my dml and all of my other classes (and believe me, it’s a big project with local and remote running) so that the enum referred would be this one.
So I guess the solution with enums and DTOs is having the same package. I also included the domain folder on the modules file.
Thank you all for trying to help me.