Hello,
When I get to this line :
OrderedTaskService orderedTaskService = Beans.get(OrderedTaskService.class);
I get this error :
com.google.inject.ConfigurationException: Guice configuration errors:
1) No implementation for com.axelor.apps.ordered.service.OrderedTaskService was bound.
while locating com.axelor.apps.ordered.service.OrderedTaskService
Can someone tell me what mistake I made?
Thanks
PakMax
Juillet 28, 2022, 8:59
2
The services should be configured with a special class called Guice module
https://docs.axelor.com/adk/5.4/dev-guide/modules/coding.html#configuration
Hi PaKMax,
package com.axelor.apps.ordered.module;
import com.axelor.app.AxelorModule;
import com.axelor.apps.ordered.service.OrderedTaskService;
import com.axelor.apps.ordered.service.OrderedTaskServiceImpl;
public class TaskModule extends AxelorModule {
@Override
protected void configure() {
bind(OrderedTaskService.class).to(OrderedTaskServiceImpl.class);
}
}
I’ve done it before, and I’ve never had this problem since the beginning of the project. I always do the same… Can we reset the bind?
For information I use eclipse.
PakMax
Juillet 28, 2022, 8:34
4
Hi @Linuxien ,
When I make significant changes in the application: new domains, new services, etc., I do the following:
Delete the build directory (and possibly bin) under the application directory.
Rebuild the app
./gradlew cleanEclipse eclipse
./gradlew build -xtest
Then, in Eclipse, delete the projects from the workspace (but be careful not to check delete contents, you would delete the sources )
Reimport previously rebuilt projects (uncheck modules)
Wait for workspace refresh
Generally I have to recreate the webapp folder by going to the application, then properties , deployment assembly , create folder , build/webapp
Then to start the server, going through the icons directly does not work, I have to launch by right-clicking on the application, then Debug on Server
Then validate definitively
WARNING :
This procedure works correctly in my development context.
There are probably different procedures…
This procedure must be carried out carefully, especially the first time.
No guarantee can be given on a correct progress, in a different development context.
Hoping this can help you.
2 « J'aime »
system
(system)
A fermé ce sujet ()
Août 28, 2022, 8:53
6
Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.