Reputation: 2883
GWT compilation fails in eclipse saying the following reason. This used to happen sometimes. Eclipse project clean would solve the issue. But now it doesn seem to work. Any actual issues that might be present? Thanks.
Compiling module com.kivar.lumina.Application
Validating units:
Ignored 9 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java'
[ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved
[ERROR] Line 17: FilterConfiguration cannot be resolved to a type
Computing all possible rebind results for 'com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory'
Rebinding com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory
Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/CampaignRequestContext.java'
[ERROR] Line 9: The import com.kivar.lumina.server.campaign.CampaignsServiceImpl cannot be resolved
[ERROR] Line 18: CampaignsServiceImpl cannot be resolved to a type
[ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java'
[ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved
[ERROR] Line 17: FilterConfiguration cannot be resolved to a type
[ERROR] Unable to find type 'com.kivar.lumina.shared.requestfactory.ApplicationRequestFactory'
[ERROR] Hint: Previous compiler errors may have made this type unavailable
[ERROR] Hint: Your source appears not to live underneath a subpackage called 'client';.....
Upvotes: 2
Views: 6083
Reputation: 5707
From the log I can't say for sure but I can guess that in your RequestContext definitions you are declaring the service implementation. You should declare the service interface instead.
EDIT: If a member of the Steering Committee says my answer is not clear it is probably true. Apologies and I'll try to be more explicit. From the log looks like there is some server class (i.e. a class that is executed on the application server; given that the log shows an error from the RequestFactory I presume we are in the middle of some client-server communication here) which is declared in the RequestFactory definition file: ApplicationRequestFactory.java. In particular, I would expect that some parameter in some method of the interface SearchRequestContext is of type FilterConfiguration. This is wrong, you should use the relative proxy instead. Moreover, looks like in the annotation for SearchRequestContext something like this has been declared:
@Service(value=CampaignsServiceImpl.class"...
interface SearchRequestContext extends RequestContext{
...
This is also wrong because instead of using the service implementation (i.e. CampaignsServiceImpl) you have to use an interface that is implemented by CampaingsServiceImpl (i.e. the service interface) and that exposes the methods defined in SearchRequestContext, obviously with the necessary translation for the request factory receivers. This implementation details you can find in the request factory documentation available here: look up for the paragraph RequestFactory interface.
I hope this all makes sense to you. Please feel free to get back with questions. In case please post your RequestFactory definition file (i.e. the java interface that extends RequestFactory)
Upvotes: 0
Reputation: 2524
From the error it is visibly seen that there is something wrong with the import with specifically below :
[ERROR] Errors in 'file:/F:/dev/insanity/agni/client/src/main/java/com/kivar/lumina/shared/requestfactory/requestcontext/SearchRequestContext.java'
[ERROR] Line 9: The import com.kivar.lumina.server.filter.FilterConfiguration cannot be resolved
Please either add the jar if you want to use FilterConfiguration. Or else, choose the src folder of the project >> Right Click >> Go to Source >> Click on unorganized imports.
It will remove all the imports which are not required for project.
Upvotes: 1