Hello all,
I’m trying to get the list of insight object types, see the following code which is a simple test version:
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectSchemaFacade;
import com.riadalabs.jira.plugins.insight.services.model.ObjectSchemaBean;
import com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectTypeFacade;
import com.riadalabs.jira.plugins.insight.services.model.ObjectTypeBean;
@Inject
public class Exporter {
private final ObjectSchemaFacade objectSchemaFacade;
private final ObjectTypeFacade objectTypeFacade;
@Inject
public Exporter(
@ComponentImport final ObjectSchemaFacade objectSchemaFacade,
@ComponentImport final ObjectTypeFacade objectTypeFacade
) throws Exception {
this.objectSchemaFacade = objectSchemaFacade;
List<ObjectSchemaBean> objectSchemaBeans = objectSchemaFacade.findObjectSchemaBeans();
this.objectTypeFacade = objectTypeFacade;
List<ObjectTypeBean> objectTypeBeans1 = objectTypeFacade.findObjectTypeBeansFlat(1);
}
}
But when I try to start the Jira service, it failed to start the plugin system, see the following error message:
___ FAILED PLUGIN REPORT _____________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 1 plugin failed to load during Jira startup.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 'com.morganstanley.ai.jira-workflow-migrator' - 'jira-workflow-migrator' failed to load.
[INFO] [talledLocalContainer] Error creating bean with name 'Exporter': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.morganstanley.ai.rest.exporter.Exporter]: Constructor threw exception; nested exception is com.riadalabs.jira.plugins.insight.common.exception.RuntimeInsightException: InsightRuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.; nested exception is: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
[INFO] [talledLocalContainer] Failed to instantiate [com.morganstanley.ai.rest.exporter.Exporter]: Constructor threw exception; nested exception is com.riadalabs.jira.plugins.insight.common.exception.RuntimeInsightException: InsightRuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.; nested exception is: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
[INFO] [talledLocalContainer] InsightRuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.; nested exception is: java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
[INFO] [talledLocalContainer] java.lang.IllegalStateException: plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
[INFO] [talledLocalContainer] plugin [{com.riadalabs.jira.plugins.insight}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] It was loaded from C:\Users\yaoqih\Projects\jira-workflow-migrator\target\jira\home\plugins\installed-plugins\jira-workflow-migrator-1.0.0-SNAPSHOT.jar
[INFO] [talledLocalContainer] 1 plugin are unaccounted for.
[INFO] [talledLocalContainer] Unaccounted for plugins load as artifacts but fail to resolve into full plugins.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 'com.morganstanley.ai.jira-workflow-migrator-tests' - 'jira-workflow-migrator' is unaccounted for.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] It has the following missing service dependencies :
[INFO] [talledLocalContainer] &myComponent of type (objectClass=com.morganstanley.ai.api.MyPluginComponent)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] It was loaded from C:\Users\yaoqih\Projects\jira-workflow-migrator\target\jira\home\plugins\installed-plugins\jira-workflow-migrator-1.0.0-SNAPSHOT-tests.jar
[INFO] [talledLocalContainer]
Note that when I tried to import object schema facade only, the plugin system started successfully. It failed only after I called objectTypeFacade.findObjectTypeBeansFlat.
Could you please advise me on how to fix this?
Regards,
Yaoqi Huang