No bean of type Temporary Attachments Monitor Locator

I started to develop an External System Importer Plugin but when I add “TemporaryAttachmentsMonitorLocator” to my SetupPage class constructor and I click on my importer’s button, it fails with the error: “No qualifying bean of type [com.atlassian.jira.issue.TemporaryAttachmentsMonitorLocator]

[INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dev.addax.jira.plugins.trello2jira.web.TrelloSetupPage': Unsatisfied dependency expressed through constructor argument with index 4 of type [com.atlassian.jira.issue.TemporaryAttachmentsMonitorLocator]: No qualifying bean of type [com.atlassian.jira.issue.TemporaryAttachmentsMonitorLocator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value=)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: **No qualifying bean of type [com.atlassian.jira.issue.TemporaryAttachmentsMonitorLocator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency**. Dependency annotations: {@com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport(value=)}
[INFO] [talledLocalContainer]   at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
public class TrelloSetupPage extends AbstractSetupPage {

    private final TemporaryAttachmentsMonitorLocator locator;

    public TrelloSetupPage(@ComponentImport UsageTrackingService usageTrackingService, @ComponentImport WebInterfaceManager webInterfaceManager,
                           @ComponentImport PluginAccessor pluginAccessor, @ComponentImport EventPublisher eventPublisher,
                           @ComponentImport TemporaryAttachmentsMonitorLocator locator) {
        super(usageTrackingService, webInterfaceManager, pluginAccessor, eventPublisher);
        this.locator = locator;
    }
    // ... other content omitted.
}

Also, I tried with “TemporaryWebAttachmentManager” because “TemporaryAttachmentsMonitorLocator” is deprecated but with the same result. In runtime, the plugin cannot find the bean of that type.

The other params in my constructor are resolved right. Only this one is what it fails. If I remove that class I can navigate to my SetupPage as is expected.

Finally, both classes are exported by the OSGi system bundle and TemporaryAttachmentsMonitorLocator is even still used in the native JIM Plugin.

Environment:

  • Jira DC 7.1.3
  • JIM 8.0.15
  • AMPS 8.1.2
  • Scanner 2.1.7

Any idea what might be the reason why it is not finding this class?
My goal is to upload a JSON file using the SetupPage.