JIRA Agile fails to be enabled during restart

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

    

Summary

 In JIRA Software, JIRA Agile add-on fails to be enabled. The following appears in the atlassian-jira.log:

  *********************************************************************************
    Atlassian GreenHopper v8.5.0-DAILY20190920183006 #230fa87c55fdb18d built 2019-09-20T20:34:46.733+02:00 - plugin starting...
    *********************************************************************************
    
2022-08-30 07:25:43,851 ThreadPoolAsyncTaskExecutor::Thread 59 ERROR      [c.a.p.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin 'com.pyxis.greenhopper.jira'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'greenhopper-launcher': Invocation of init method failed; nested exception is com.thoughtworks.xstream.mapper.CannotResolveClassException: style
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1686)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: style
	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
	at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
	at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
	at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052)
	at com.atlassian.greenhopper.service.PersistenceServiceImpl.getData(PersistenceServiceImpl.java:148)
	at com.atlassian.greenhopper.upgrade.UpgradeVersionService.getPluginRunInfoImpl(UpgradeVersionService.java:234)
	at com.atlassian.greenhopper.upgrade.UpgradeVersionService.recordPluginStarted(UpgradeVersionService.java:195)
	at com.atlassian.greenhopper.service.logging.LogSupportInfo.logSupportInfoOnStartup(LogSupportInfo.java:58)
	at com.atlassian.greenhopper.service.logging.LogSupport.onPluginStarting(LogSupport.java:42)
	at com.atlassian.greenhopper.Launcher.onSpringContextStarted(Launcher.java:178)


Environment

Jira Software

Diagnosis

  • Run the following SQL statement. propertyvalue column should return an XML entry. 

    select * from propertyentry pe 
    inner join propertytext pt on pe.id = pt.id 
    where (pe.entity_name like 'GreenHopper.Run.History' or pe.entity_name like 'GreenHopper.UpgradeHistory');
  • Any other entry that does not return an XML can be considered as problematic

    Expected entry
    <map>
      <entry>
        <string>pluginVersion</string>
        <string>8.20.10</string>
      </entry>
      <entry>
        <string>ranOn</string>
        <string>2022-09-01T10:49:14.398+02:00</string>
      </entry>
      <entry>
        <string>buildDate</string>
        <string>2022-06-22T16:16:50.081+02:00</string>
      </entry>
      <entry>
        <string>latestUpgradeTaskRun</string>
        <string>0</string>
      </entry>
      <entry>
        <string>changeSet</string>
        <string>b92c120b3532fd60</string>
      </entry>
    </map>
  • The following result is just an example of an problematic entry

    Problematic entry
    <style> h1{backgroundcolor:red}</style> <h1> New version will be released on 1.9. migrated to the cloud from 3:00 p.m </h1>

Cause

JIRA Software's configurations are stored as XML within the database. With that, if the XML is invalid for any reason (eg. manually modified, corrupted, etc), it can result in the above error.

Solution

  1. Restore Jira database to a pre-corruption state
  2. If restoring a previous Jira backup  is not possible, you could attempt to delete these entries in both propertyentry and propertytext tables but if other records are still corrupted, you would face other unknown issues

    Atlassian Support cannot guarantee to provide any support for the steps described on this page as direct data manipulation is not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

    Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.


    1. Stop JIRA
    2. Backup Jira database
    3. Run the following SQL to remove the content. You need to replace pt1.propertyvalue value for the one identified using the Diagnosis query.
      These queries were written for Postgres and may have to be updated to work on another database:

      1. Query #1 - Get propertyentry Ids to be deleted. Copy those Ids. Those Ids will be needed for Query#3

        select pe.id from propertyentry pe 
        inner join propertytext_1 pt1 on pe.id = pt1.id 
        where (pe.entity_name like 'GreenHopper.Run.History' or pe.entity_name like 'GreenHopper.UpgradeHistory')
        and pt1.propertyvalue ='<style> h1{backgroundcolor:red}</style> <h1> New version will be released on 1.9. migrated to the cloud from 3:00 p.m </h1>';
      2. Query #2 - Delete propertytext table entries

        delete from propertytext pt 
        where id in (
        				select pe.id from propertyentry pe inner join propertytext pt1 on pe.id = pt1.id 
        				where (pe.entity_name like 'GreenHopper.Run.History' or pe.entity_name like 'GreenHopper.UpgradeHistory')
        				and pt1.propertyvalue ='<style> h1{backgroundcolor:red}</style> <h1> New version will be released on 1.9. migrated to the cloud from 3:00 p.m </h1>';
      3. Query #3 - Delete propertyentry table entries

        delete from propertyentry where id in (paste here all Ids from Query#1);
    4. Start Jira


Last modified on Sep 20, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.