Unable to inject service/Bean exposed by JiraFishEye plugin

Jira version : 4.1.2

jira-fisheye-plugin : 3.0.17

I have declared the below in my atlassian-plugin.xml and the component is getting injected into my custom plugin class. However I get the Error " java.lang.NoClassDefFoundError: com/atlassian/jirafisheyeplugin/domain/FishEyeInstance" when I try calling methods on FishEyeInstanceStore to get the FishEyeURL.

<component-import key="fisheyeInstanceStore">
<interface>com.atlassian.jirafisheyeplugin.config.FishEyeInstanceStore</interface>
</component-import>

I tried importing the packing by adding

<bundle-instructions>
<Import-Package>com.atlassian.jirafisheyeplugin.domain,*;resolution:="optional"</Import-Package>
</bundle-instructions>

in atlassian-plugin.xml but the plugin throws the error at startup

Any help will be appreciated.

1 answer

This widget could not be displayed.

Hi, you need to export these packages from the jira-fisheye-plugin as they are not exported by default.

Grab the source from here:

https://bitbucket.org/atlassian/jira-fisheye-plugin

Add something similar to this to the

<bundle-instructions><Export-Package>

 in the atlassian-plugin.xml for each package you need:

 

&lt;bundle-instructions&gt;
            &lt;Import-Package&gt;
				...
            &lt;/Import-Package&gt;
            &lt;Export-Package&gt;
                com.atlassian.jirafisheyeplugin.config.accesscondition.*,
                com.atlassian.applinks.api.application.stash;version="3.2",
                com.atlassian.jirafisheyeplugin.config.fisheye*,
                com.atlassian.jirafisheyeplugin.upgrade.legacy.config.fisheye*,
                com.atlassian.jirafisheyeplugin.domain.fisheye*,
                com.atlassian.jirafisheyeplugin.domain.crucible*,
                com.atlassian.jirafisheyeplugin.perforce*
            &lt;/Export-Package&gt;
            &lt;Bundle-Description&gt;Makes FishEye changesets visible on projects and issues inside JIRA.&lt;/Bundle-Description&gt;
            &lt;Spring-Context&gt;*;timeout:=360&lt;/Spring-Context&gt;
        &lt;/bundle-instructions&gt;

 

Then recompile, install the Modified jira-fisheye-plugin to your local maven (or however you will determine dependencies):

atlas-mvn install:install-file -DgroupId=com.atlassian.jira.plugins -DartifactId=jira-fisheye-plugin -Dversion=x.x.x-M1 -Dpackaging=jar -Dfile=target/jira-fisheye-plugin-x.x.x-M1.jar

Then update your plugin's dependencies to include the new jira-fisheye-plugin.

Should work

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

98 views 13 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you