# PluginSettingsFactory throws error

**URL:** <https://community.developer.atlassian.com/t/pluginsettingsfactory-throws-error/2378>\
**Category:** Jira Server\
**Tags:** java, jira-server\
**Created:** [April 11, 2017, 10:12pm UTC](https://community.developer.atlassian.com/t/pluginsettingsfactory-throws-error/2378 "2017-04-11T22:12:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushikveluru](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/kaushikveluru/32/35971_2.png) [@kaushikveluru](https://community.developer.atlassian.com/u/kaushikveluru)\
**Post date:** [April 11, 2017, 10:12pm UTC](https://community.developer.atlassian.com/t/pluginsettingsfactory-throws-error/2378/1 "2017-04-11T22:12:41Z")

</div>

Hi,

I would like to use Plugin Settings for data storage of my JIRA plugin. I have already used PluginSettingsFactory once in my BitBucket plugin last month. So I am familiar with it. However, when I try to use the same in JIRA plugin, it throws this error:

```auto
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.jira.plugins.condition.IsMasterAndAdminCondition': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.sal.api.pluginsettings.PluginSettingsFactory]: : No qualifying bean of type [com.atlassian.sal.api.pluginsettings.PluginSettingsFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.

```

I am trying to use this in Condition class of a web-item. This is how I imported it in the condition class.

```auto
//TODO: To fetch projet key settings from pluginsettings
    /*@ComponentImport
    private final PluginSettingsFactory pluginSettingsFactory;

    @Autowired
    IsMasterAndAdminCondition(PluginSettingsFactory pluginSettingsFactory){
        this.pluginSettingsFactory = pluginSettingsFactory;
    }*/

```

What am I doing wrong? Is the usage different in JIRA compared to BitBucket?

---

<div class="post-metadata">

**Author:** ![M.Abdel-Mola](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@M.Abdel-Mola](https://community.developer.atlassian.com/u/M.Abdel-Mola)\
**Post date:** [April 12, 2017, 10:51am UTC](https://community.developer.atlassian.com/t/pluginsettingsfactory-throws-error/2378/2 "2017-04-12T10:51:26Z")

</div>

Maybe you need to add the @Scanned Annotation to your condition class

---

<div class="post-metadata">

**Author:** ![kaushikveluru](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/kaushikveluru/32/35971_2.png) [@kaushikveluru](https://community.developer.atlassian.com/u/kaushikveluru)\
**Post date:** [April 12, 2017, 1:20pm UTC](https://community.developer.atlassian.com/t/pluginsettingsfactory-throws-error/2378/3 "2017-04-12T13:20:26Z")

</div>

@M.Abdel-Mola Thank you. That worked.
