I have a servlet and a REST module that needs to render markup. It injects the RendererManager in the typical way and gets an instance of jiraRendererPlugin:
private final JiraRendererPlugin jiraRendererPlugin;
private static final IssueRenderContext NULL_ISSUE_RENDER_CONTEXT = new IssueRenderContext(null);
@Inject
public SearchEndpoint(JiraAuthenticationContext authenticationContext, ProjectPortalHelper projectPortalHelper, @ComponentImport RendererManager rendererManager) {
this.authenticationContext = authenticationContext;
this.projectPortalHelper = projectPortalHelper;
this.jiraRendererPlugin = rendererManager.getRendererForType(AtlassianWikiRenderer.RENDERER_TYPE);
}
This works fine when installed at runtime. However during application node startup, the plugin fails to start.
___ FAILED PLUGIN REPORT _____________________
1 plugin failed to load during Jira startup.
'com.spacex.jira.custom-portal' - 'Custom Portals for Jira Service Desk' failed to load.
Error creating bean with name 'searchEndpoint': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.spacex.jira.SearchEndpoint]: Constructor threw exception; nested exception is java.lang.IllegalStateException: The default text renderer for Jira has been disabled, please re-enable the text renderer for correct funtioning to resume.
Failed to instantiate [com.spacex.jira.SearchEndpoint]: Constructor threw exception; nested exception is java.lang.IllegalStateException: The default text renderer for Jira has been disabled, please re-enable the text renderer for correct funtioning to resume.
The default text renderer for Jira has been disabled, please re-enable the text renderer for correct funtioning to resume.
It was loaded from /var/atlassian/application-data/jira/shared/plugins/installed-plugins/custom-portal-1.0.5.jar
How do I properly require this dependency so that the plugin will wait for Atlassian markup renderer to be there? This exception appears to be thrown when there are NO renderers available.