Stacktrace When loading a configuration which references non existing projects

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 29, 2013

Scenario

* Create a project dump on one system

* Load the dump into a fresh JIRA instance (no config whatsoever)

Load fails because the dump references a project 'CAR' in the custom field context, which doesn't exist

com.awnaba.projectconfigurator.utils.errorhandling.XMLInputDataException: Found reference to non existing project with key: CAR
	at com.awnaba.projectconfigurator.jiraobjectfacades.FieldToolsImpl.getJiraContexts(FieldToolsImpl.java:1311)
	at com.awnaba.projectconfigurator.jiraobjectfacades.FieldToolsImpl.createFieldConfigScheme(FieldToolsImpl.java:1268)
	at com.awnaba.projectconfigurator.loaders.handlers.CustomFieldConfigSchemeHandler.createNewTargetFrom(CustomFieldConfigSchemeHandler.java:248)
	at com.awnaba.projectconfigurator.loaders.handlers.CustomFieldConfigSchemeHandler.createNewTargetFrom(CustomFieldConfigSchemeHandler.java:1)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler$1.createNewFrom(AbstractIntegratedHandler.java:179)
	at com.awnaba.projectconfigurator.loaders.core.AbstractSmartCreator.smartCreate(AbstractSmartCreator.java:13)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.shallowCreate(AbstractIntegratedHandler.java:194)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.createTarget(AbstractIntegratedHandler.java:152)
	at com.awnaba.projectconfigurator.loaders.core.AbstractTargetHandler.handleTarget(AbstractTargetHandler.java:91)
	at com.awnaba.projectconfigurator.loaders.core.CollectionMatcher.match(CollectionMatcher.java:27)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.handleOneTypeOfSubordinates(AbstractIntegratedHandler.java:291)
	at com.awnaba.projectconfigurator.loaders.core.AbstractIntegratedHandler.handleSubordinateCollections(AbstractIntegratedHandler.java:276)

2 answers

1 accepted

0 votes
Answer accepted
José Marañón [Awnaba Software S.L.]
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.
April 29, 2013

Currently, the plugin does not create those projects referenced in custom field contexts. Instead, if it finds one that does not exist in the target, it aborts the load as you have seen. This behaviour is documented in https://awnaba.atlassian.net/wiki/display/PCP/Specific+information+for+some+object+types, in the section "Custom fields". The idea behind it was that the load process would only change a single project.

The workaround is to create before the load a project with key "CAR". This project need not have anything else, it is enough if it exists and has key "CAR".

There is a new feature request, that would have the plugin create automatically those projects used by custom field contexts at https://awnaba.atlassian.net/browse/PCP-24.

If you think this is a good idea, please vote it. Thanks!

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 29, 2013

An alternative would be to skip creating the context when the project doesn't exist ?

José Marañón [Awnaba Software S.L.]
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.
May 6, 2013

Yes, it would be an option. But it would break the rule that the configuration in the XML file is replicated in the target instance after the load, as the custom field would end with a different configuration. I think, that would require, at least, a previous warning to the user.

Do you like PCP-24? The idea is that it could be enabled/disabled by the user before the load.

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 6, 2013
Roy Chapman August 25, 2015

This issue still apparent in the latest release. The project key is the project that I want to import. I have got around this by creating the project and then importing

José Marañón [Awnaba Software S.L.]
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.
August 25, 2015

See my answer at [https://answers.atlassian.com/questions/24657532]. This could be another version of the same problem.

0 votes
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 29, 2013

Some additional info

INFO  11:31:01,707 Creating custom field Quote Comments of type com.atlassian.jira.plugin.system.customfieldtypes:textarea
INFO  11:31:01,710 [Custom Field Quote Comments] Creating configuration scheme Default Configuration Scheme for Quote Comments
ERROR 11:31:01,711 Load failed for reason: Found reference to non existing project with key: CAR
ERROR 11:31:01,711 Error context: [Custom Field Quote Comments]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events