Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira restart issue because of plugin

Youssef Bouchara March 11, 2022

So we have upgraded Jira from 8.5.7 to 8.20.3 and also upgraded the plugin pom file to match the jira version but the problem is that once we restart Jira the restart fails because of this one plugin that we are using... there is no issue when we install the plugin when Jira is running but once we restart Jira it fails because the plugin doesn't work....

Jira Log

2022-01-27 11:21:53,739+0000 ThreadPoolAsyncTaskExecutor::Thread 6 ERROR      [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.rest.atlassian-rest-module, config=osgibundle:/META-INF/spring/.xml))2022-01-27 11:21:53,739+0000 ThreadPoolAsyncTaskExecutor::Thread 6 ERROR      [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.rest.atlassian-rest-module, config=osgibundle:/META-INF/spring/.xml))org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restUriBuilder' defined in URL [bundle://180.0:0/META-INF/spring/atlassian-plugin-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.plugins.rest.module.util.RestUrlBuilderImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.sun.jersey.spi.service.ServiceFinder at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1300) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)

 

2022-01-27 11:25:58,934+0000 Spring DM Context Creation Timer ERROR      [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.jira.admin-project-config-plugin, config=osgibundle:/META-INF/spring/.xml))2022-01-27 11:25:58,934+0000 Spring DM Context Creation Timer ERROR      [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.jira.admin-project-config-plugin, config=osgibundle:/META-INF/spring/.xml))org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.jira.admin-project-config-plugin' has timed out waiting for (&(objectClass=com.atlassian.applinks.api.ApplicationLinkService)(objectClass=com.atlassian.applinks.api.ApplicationLinkService)) at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:489) at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.access$000(DependencyWaiterApplicationContextExecutor.java:54) at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$WatchDogTask.run(DependencyWaiterApplicationContextExecutor.java:109) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)

 

1 answer

1 vote
Rilwan Ahmed
Community Champion
March 11, 2022

Hi @Youssef Bouchara ,

Please do the following and let us know if it resolves your issues.

1. Restart Jira

  • Shut down JIRA.
  • Delete the following hidden plugin cache directories: JIRA_HOME/plugins/.bundled-plugins JIRA_HOME/plugins/.osgi-plugins.
  • Restart JIRA (These directories will be recreated on JIRA reboot with new plugin cache)

    OR 

2. Increase wait time. i.e. set  -Datlassian.plugins.enable.wait=300 to the JIRA application startup arguments, as in  https://confluence.atlassian.com/adminjiraserver070/setting-properties-and-options-on-startup-749383528.html 

Youssef Bouchara March 11, 2022

Hi @Rilwan Ahmed

 

we have already cleaned up the plugin cache but it didn't resolve the problem.... :/

Rilwan Ahmed
Community Champion
March 11, 2022

@Youssef Bouchara 

As per the logs, it is related to timeout.  Please try below steps.

1. Increase the plugin timeout period by adding the
-Datlassian.plugins.enable.wait=300 argument to the JIRA application startup arguments, as in  https://confluence.atlassian.com/adminjiraserver070/setting-properties-and-options-on-startup-749383528.html 

2. Check if any plugins are in disabled state and perform steps mentioned in https://confluence.atlassian.com/jirakb/jira-startup-fails-with-message-that-required-plugins-are-not-started-254738702.html

Finally you can go throgh more troubleshooting guide to check any other factors are affecting yuor application.
https://confluence.atlassian.com/jirakb/troubleshoot-a-jira-server-startup-failed-error-394464512.html

Youssef Bouchara March 11, 2022

@Rilwan Ahmed I increased the time but it still didn't help... The plugin works fine when installed on jira when it's running but only fails when the jira is restarting... could it be from the plugin ? like some dependency is missing after it has been upgraded? 

Rilwan Ahmed
Community Champion
March 11, 2022

Did you try  Check if any plugins are in disabled state and perform steps mentioned in https://confluence.atlassian.com/jirakb/jira-startup-fails-with-message-that-required-plugins-are-not-started-254738702.html

Which version of jira and what is the pluign name ?

Youssef Bouchara March 11, 2022

@Rilwan Ahmed I checked and both the plugins that are causing the error are set to "false" as you can see in the picture.. "com.capgemini.jira.PMOExcelExporter" and "com.capgemini.jira.PMOGenerator" I'm running the SQL query 

DELETE FROM pluginstate WHERE pluginkey='<pluginkey>';

 but both of them still show up in the table.... not sure why?

 

Jira version is 8.20.3 image.png

Rilwan Ahmed
Community Champion
March 11, 2022

@Youssef Bouchara 

Few solutions I can provide. Please follow all steps.  Seems you did not run this SQL last time

DELETE FROM pluginstate WHERE pluginkey LIKE 'com.atlassian.%';

 

  1. As you upgraded from  8.5.7 to 8.20.3  jira version, was the plugins also upgraded accordingly ? If not, please contact the capgemini plugin dev team to rebuild it. 

  2. As I could see atlassian* plugins in the table, So
    • Stop jira
    • delete atlassian* plugins from table

      DELETE FROM pluginstate WHERE pluginkey LIKE 'com.atlassian.%';
    • and then delete your plugins

      DELETE FROM pluginstate WHERE pluginkey='<pluginkey of capgemini>';

    • Clear plugin cache 
    • Restart jira

Suggest an answer

Log in or Sign up to answer