in my report plugin, i extended AbstractSearchRequestExcelView and to start off with, its exactly the same code as the atlassian class: SearchRequestExcelViewCurrentFields
i get an UnsatisfiedDependencyException as shown here:
com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xeroxxls.jira.plugins.search.SearchRequestXLSPrjTrackExcel': Unsatisfied dependency expressed through constructor argument with index 3 of type [com.atlassian.jira.web.component.TableLayoutFactory]: : No unique bean of type [com.atlassian.jira.web.component.TableLayoutFactory] is defined:
do i need to inject the TableLayoutFactory into my constructor? (i attempted this but im not too familiar with this Spring injection stuff either) or maybe i need to declare it as a component in my plugin?
this is the extended class:
public class SearchRequestXLSPrjTrackExcel extends AbstractSearchRequestExcelView { private TableLayoutFactory tableLayoutFactory; private SearchRequestViewBodyWriterUtil searchRequestViewBodyWriterUtil; public SearchRequestXLSPrjTrackExcel(JiraAuthenticationContext authenticationContext, SearchProvider searchProvider, ApplicationProperties appProperties, TableLayoutFactory tableLayoutFactory, SearchRequestViewBodyWriterUtil searchRequestViewBodyWriterUtil) { super(authenticationContext, searchProvider, appProperties, tableLayoutFactory, searchRequestViewBodyWriterUtil); this.tableLayoutFactory = tableLayoutFactory; this.searchRequestViewBodyWriterUtil = searchRequestViewBodyWriterUtil; } protected IssueTableLayoutBean getColumnLayout(SearchRequest searchRequest, User user) { return tableLayoutFactory.getStandardExcelLayout(searchRequest, user); } }
Community moderators have prevented the ability to post new answers.
You have to remove TableLayoutFactory tableLayoutFactory from your constructor and use ComponentAccessor.getComponent(TableLayoutFactory.class) instead as parameter for your super() call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.