I am getting error in REST plugin.
ComponentAccessor has not been initialised.
I am using static method ComponentAccessor.getComponent
i think you have to try with <strong><a href="https://docs.atlassian.com/jira/latest/com/atlassian/jira/component/ComponentAccessor.html#getComponentOfType(java.lang.Class)" rel="nofollow noopener noreferrer">getComponentOfType</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" rel="nofollow noopener noreferrer">Class</a><T> componentClass)
<strong><a href="https://docs.atlassian.com/jira/latest/com/atlassian/jira/component/ComponentAccessor.html#getComponentOfType(java.lang.Class)" rel="nofollow noopener noreferrer">getComponentOfType</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" rel="nofollow noopener noreferrer">Class</a><T> componentClass)
check this doc
https://docs.atlassian.com/jira/latest/com/atlassian/jira/component/ComponentAccessor.html
can you share your code ?
import com.atlassian.jira.component.ComponentAccessor;
if (fieldConfigId != null) { FieldConfigManager fieldConfigManager = ComponentAccessor.getComponent(FieldConfigManager.class); fieldConfig = fieldConfigManager.getFieldConfig(fieldConfigId); }
can you try with getComponentofType(FieldConfigManager.class) method
I tried ComponentAccessor.getComponentOfType same error
Just out of curiosity, where in your class are you trying to receive the ComponentAccessor?
why can't you instialize this through constructor?
check here, in this class it is insitialized through constructor and used
https://bitbucket.org/topmanage/tm-project-templates/src/4e51f3d7e365/src/main/java/com/topmanage/jiraplugins/projecttemplates/ProjectCloner.java
It looks like you're new here. Sign in or register to get started.