# Dependency issues with Insight, required class missing

**URL:** <https://community.developer.atlassian.com/t/dependency-issues-with-insight-required-class-missing/62756>\
**Category:** Jira Server\
**Tags:** plugin-sdk, jira-plugin, dependencies, insight\
**Created:** [October 20, 2022, 3:54pm UTC](https://community.developer.atlassian.com/t/dependency-issues-with-insight-required-class-missing/62756 "2022-10-20T15:54:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarolineW](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@CarolineW](https://community.developer.atlassian.com/u/CarolineW)\
**Post date:** [October 20, 2022, 3:54pm UTC](https://community.developer.atlassian.com/t/dependency-issues-with-insight-required-class-missing/62756/1 "2022-10-20T15:54:11Z")

</div>

Hi Jira Community,

I’ve seen there’s a tutorial for creating own Field types e.g., to limit access based on user groups.

[https://developer.atlassian.com/server/jira/platform/creating-a-custom-field-type/](https://developer.atlassian.com/server/jira/platform/creating-a-custom-field-type/)

I’ve already successfully done if for other field types and I wanted to do a custom Insight field that I’m extending from:

```auto
com.riadalabs.jira.plugins.insight.services.jira.customfield.DefaultObjectCustomField

```

I’ve the following insight dependencies:

```auto
<dependency>
    <groupId>com.riadalabs.jira.plugins</groupId>
    <artifactId>insight</artifactId>
    <version>9.0.7</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.atlassian.jira.plugins</groupId>
    <artifactId>insight-cve-integration</artifactId>
    <version>1.3.9</version>
</dependency>

```

I thought DefaultObjectCustomField should be included in com.riadalabs.jira.plugins but when I try to install it I get:

```auto
[c.t.common.MypluginOnStartupListener] Disabling plugin
2022-10-20 15:07:43,100+0000 UpmAsynchronousTaskManager:thread-3 INFO myusername 999x14314x4 1u6i88e 80.146.191.211,100.125.67.227 /rest/plugins/1.0/available/featured [c.a.plugin.manager.DefaultPluginManager] Updating plugin 'com.mycompany.myplugin:1.0.4 A required class was missing: adminonlyinsightfield.name. Please check that you have all of the required dependencies.<br/>com/riadalabs/jira/plugins/insight/services/jira/customfield/DefaultObjectCustomField' from version '1.0.4' to version '1.0.4'

```

I’m a bit confused what causes it, since I’ve successfully worked with the Insight Plugin before. Has anyone maybe an idea what could cause that behavior?

---

<div class="post-metadata">

**Author:** ![CraigShannon](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@CraigShannon](https://community.developer.atlassian.com/u/CraigShannon)\
**Post date:** [October 24, 2022, 2:00am UTC](https://community.developer.atlassian.com/t/dependency-issues-with-insight-required-class-missing/62756/2 "2022-10-24T02:00:15Z")

</div>

Hi @CarolineW,

I think the issue that you are seeing is because the dependency on Insight is provided and the class which you are trying to extend `DefaultObjectCustomField` is not in an exported public API package. As the class is not included in the public APIs or exported by OSGI, extending it isn’t something that is supported at this point.

If you were to set the dependency as compile scope, your plugin would then bundle the jar which should resolve the issue that you see, but you may run into other issues if it is not the same version which is deployed. Since you are just using it to create a custom field and then presumably exporting your own custom field to Jira and not for the exported services, it may be ok.

As an aside, I would also suggest upgrading to a newer version of Insight, now Assets. The last release of the 9.x branch was 9.1.12. The version you have in your POM is from around April 2021 and since then there has been a lot of bug and performance fixes on Insight/Assets.

Hope this helps.

Thanks,  
Craig  
JSM DC

---

<div class="post-metadata">

**Author:** ![CarolineW](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@CarolineW](https://community.developer.atlassian.com/u/CarolineW)\
**Post date:** [November 3, 2022, 6:27pm UTC](https://community.developer.atlassian.com/t/dependency-issues-with-insight-required-class-missing/62756/4 "2022-11-03T18:27:33Z")

</div>

Thank you for your answer. I know that Insight is now in Assets and I proabably should update, but to be honest I’m pretty confused what the corresponding Maven libary that replaces _com.riadalabs.jira.plugins.insight_ is. Can you give me a hint?
