Hi, I'm trying to create a James server (I'm using release 3.8) without the admin module. Main reason for this is that I want a minimal system.
As an experiement I created a copy of the jpa-smtp-app and then tried to remove modules related to the webadmin. It works if I disable some admin modules. However disabling the DataRoutesModules results in a runtime error when trying to start the application. >From JPAJamesServerMain: private static final Module PROTOCOLS = Modules.combine( new ProtocolHandlerModule(), new SMTPServerModule(), // new WebAdminServerModule(), // new DataRoutesModules(), // new MailRepositoriesRoutesModule(), // new MailQueueRoutesModule(), // new NoJwtModule(), new DefaultProcessorsConfigurationProviderModule(), new TaskManagerModule()); With the admin modules commented out, compilation works. However at runtime the folllowing error is shown: 16:19:18.519 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James com.google.inject.CreationException: Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Set<AdditionalInformationDTOModule<? extends TaskExecutionDetails$AdditionalInformation, ? extends AdditionalInformationDTO>> was bound. Did you mean? Set<AdditionalInformationDTOModule<? extends TaskExecutionDetails$AdditionalInformation, ? extends AdditionalInformationDTO>> annotated with @Named(value="additional_information_dto") bound at TaskSerializationModule.provideAdditionalInformationDTOModules(TaskSerializationModule.java:60) \_ installed by: Modules$OverrideModule -> Modules$CombinedModule -> Modules$CombinedModule -> Modules$CombinedModule -> TaskManagerModule -> TaskSerializationModule Requested by: 1 : TaskSerializationModule.provideAdditionalInformationDTOModules(TaskSerializationModule.java:60) \_ for 1st parameter at TaskSerializationModule.provideAdditionalInformationDTOModules(TaskSerializationModule.java:60) \_ installed by: Modules$OverrideModule -> Modules$CombinedModule -> Modules$CombinedModule -> Modules$CombinedModule -> TaskManagerModule -> TaskSerializationModule Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 2) [Guice/MissingImplementation]: No implementation for Set<TaskDTOModule<? extends Task, ? extends TaskDTO>> was bound. Did you mean? Set<TaskDTOModule<? extends Task, ? extends TaskDTO>> annotated with @Named(value="task_dto") bound at TaskSerializationModule.provideTaskDTOModules(TaskSerializationModule.java:83) \_ installed by: Modules$OverrideModule -> Modules$CombinedModule -> Modules$CombinedModule -> Modules$CombinedModule -> TaskManagerModule -> TaskSerializationModule Requested by: 1 : TaskSerializationModule.provideTaskDTOModules(TaskSerializationModule.java:83) \_ for 1st parameter at TaskSerializationModule.provideTaskDTOModules(TaskSerializationModule.java:83) \_ installed by: Modules$OverrideModule -> Modules$CombinedModule -> Modules$CombinedModule -> Modules$CombinedModule -> TaskManagerModule -> TaskSerializationModule If I only enable DataRoutesModules, the above error is not shown. private static final Module PROTOCOLS = Modules.combine( new ProtocolHandlerModule(), new SMTPServerModule(), // new WebAdminServerModule(), new DataRoutesModules(), // new MailRepositoriesRoutesModule(), // new MailQueueRoutesModule(), // new NoJwtModule(), new DefaultProcessorsConfigurationProviderModule(), new TaskManagerModule()); The DataRoutesModules however pull in spark-core via a dependency (and therefore also jetty etc) which I would like to prevent. What I do not understand is that it looks like "Set<AdditionalInformationDTOModule<? extends TaskExecutionDetails$AdditionalInformation, ? extends AdditionalInformationDTO>>" is provided by TaskSerializationModule and TaskSerializationModule is installed by TaskManagerModule. It therefore looks like there is an implementation available. Any suggestion on how I can complete remove the web admin (and it's dependencies). Kind regards, Martijn Brinkers