Create a new extension with only one simple class which extends DefaultPDFExportJobRequestFactory.
In components.txt add something like this {{10:org.xwiki.example.CustomPDFExportJobRequestFactory }}. So we expected that this would override DefaultPDFExportJobRequestFactory
Install this extension on the main wiki.
Run this simple groovy script:
{{groovy}}
println services.component.getInstance(org.xwiki.export.pdf.job.PDFExportJobRequestFactory.class)
println services.export.pdf.requestFactory
{{/groovy}}
Expected:
The result of the groovy script is:
So it seem that that the custom is not correctly loaded in the PDFExportScriptService.
Workaround: if we install the extension in the farm + we reboot the instance it seem working as expected.
1 update
Changes by Josué Tille on 04/Aug/26 10:43
Description:
Step to reproduce:
* Create a new extension with only one simple class which extends {{DefaultPDFExportJobRequestFactory}}. * In {{components.txt}} add something like this {{10:org.xwiki.example.CustomPDFExportJobRequestFactory }}. So we expected that this would override {{DefaultPDFExportJobRequestFactory}} * Install this extension on the main wiki. * Run this simple groovy script: {code} {{groovy}} println services.component.getInstance(org.xwiki.export.pdf.job.PDFExportJobRequestFactory.class) println services.export.pdf.requestFactory {{/groovy}} {code} Expected:
The result of the groovy script is: {code} org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420 org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420 {code}
Currently:
The result of the groovy script is: {code} org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420 org.xwiki.export.pdf.internal.job.DefaultPDFExportJobRequestFactory@2581a82e {code}
So it seem that that the custom class is not correctly loaded in the {{PDFExportScriptService}}.
Workaround: if we install the extension in the farm + we reboot the instance it seem working as expected.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.