Open radist-nt opened 2 years ago
See ready eclipse project issue-test.zip
Any pr are welcome
Hmm... however, it's not a ultimate fix. xdocreport uses static singleton for TemplateEngineInitializerRegistry, so if it will be deployed as module and several war deployments will use the same TemplateEngineInitializerRegistry and initializers from the only first war deployment will be activated...
Method
fr.opensagres.xdocreport.core.registry.AbstractRegistry.initializeIfNeeded()
uses it's class classloader to load the service. The problem is that some services could be not accessible under this classloader.Steps to reproduce:
In the modules directory create module fr.opensagres.xdocreport module with xdocreport, template engines and dependencies:
modules/fr/opensagres/xdocreport/main
module.xml
:import fr.opensagres.xdocreport.document.discovery.ITemplateEngineInitializerDiscovery; import fr.opensagres.xdocreport.template.ITemplateEngine;
public class EngineInitializer implements ITemplateEngineInitializerDiscovery {
}
<?xml version="1.0" encoding="UTF-8"?>
2022-04-06 13:10:03,189 INFO [stdout] (default task-71) initialized 2022-04-06 13:10:03,189 INFO [stdout] (default task-71) initialized 2022-04-06 13:10:03,189 INFO [stdout] (default task-71) initialized 2022-04-06 13:10:03,189 INFO [stdout] (default task-71) initialized