custom fields disappear after restart

francis
Atlassian Partner
September 4, 2011

I'm wondering if someone encountered follwoing issue

* Setup JIRA 4.4
* Install the jira-confluence-link plugin from customware
* Configure a confluence link custom field and configure it
* Restart the instance

Effect

* The custom field disappeared

* The logging states

[jira.issue.managers.DefaultCustomFieldManager] Could not load custom field type plugin with key 'net.customware.jira.plugins.jiraconfluencelink.jira-confluence-link:confluencelink'. Is the plugin present and enabled?

*BUT*

The plugin is available in the UPM.

6 answers

1 accepted

0 votes
Answer accepted
francis
Atlassian Partner
October 23, 2011

This issue is resolved with JIRA 4.4.3 and Greenhopper 5.8.1

Francis

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2011

IMHO this class was doing something very iffy: http://docs.atlassian.com/greenhopper/5.6.1/com/atlassian/greenhopper/dev/Reloader.html - it caused me problems too. Removed from 5.7 and above.

1 vote
Vincent Thoulé
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2011

It is problem I met since long time with my customfield and alos my listener.

Similar issues may also occurs with MercuryListener from Go2Group and Gantt plugin.

These plugins access to CustomfieldManager, ServiceManager or init Listerner, before Plugin System is ready.

This causes a failure of your components if your customfield, Service or Listener have dependencies on other part of your plugins.

The only workaround is to remove direct dependencies (in constructor) and resolves the dependencies on demand (by calling getComponentOfInstance for V1 or getOSGiComponentOfInstance for V2) ... You will gain an IllegalCallException (or something like that) as Warning from JIRA that a naughty call has bee done, but your component is enabled and working.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2011

Interesting but to me that doesn't explain how when greenhopper 5.7 is out of the picture, everything works normally.

0 votes
Vincent Thoulé
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2011

When GH uses CustomFieldManager (before that Plugin System has loaded all plugins), DefaultCustomFieldManager loads all Customfield defined in Database. In most case, their are loaded whitout issue, but if they have direct dependencies (in Constructor), if these dependencies are provided by a not yet loaded Plugin, then the customfield is disabled (due to missing dependencies), since CustomfieldManager is defined to load customfield when Plugin System is ready, not before.

0 votes
Andrey Larionov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2011

There is bug found by me today. When Plugin System perform start (ComponentRegistrar performs during calling quickStart() method) it broadcasts PluginEnableEvent. It may be processed by some listeners and produce too early initialization. For example RankService of GreenHopper plugin calls CustomFieldManager during processing this event. CustomFieldManager instantiates all the registered at this time CustomFieldTypes, but they can have dependencies, which are located not in loaded yet plugins.

francis
Atlassian Partner
September 5, 2011

Andrey,

This could be a root cause & thanks for mentioning it. On what JIRA version did you find this issue ?

Francis

Andrey Larionov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2011

JIRA 4.4. But i think simmilar problems could be found in any version with different plugins, especially with static calls as mentioned by you

francis
Atlassian Partner
September 5, 2011

Well, this is the first time I've seen this behaviour.

Andrey Larionov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2011

Right now i made a test, which show what without GreenHopper my customFields plugins starts normaly

francis
Atlassian Partner
September 7, 2011

Yes - I can confirm. Disabling Greenhopper and restarting JIRA is solving the issue.

Scratch head.

0 votes
francis
Atlassian Partner
September 4, 2011

Hi Jamie,

Yes the plugins are enabled.
I found some references where plugins who instantantiate a customfieldmanager statically got into troubles.

Francis

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2011

Mmm, can you go into the logs in more detail? And maybe turn up the logging levels a bit?

francis
Atlassian Partner
September 5, 2011

Hi Nic,

I'm trying to narrow down the root cause by doing a step by step. I will bring up logging also to debugging level and see if this reveals something.

Francis.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2011

Is it definitely "enabled" after the restart? I have seen some plugins that persistently disable themselves on startup, for no obvious reason.

Suggest an answer

Log in or Sign up to answer