JIRA not starting with NoClassDefFoundError (JiraCaptchaServiceImpl)

sam walbank November 17, 2015

Hi,

We have been using JIRA 5.1.4 on Ubuntu 12.04.1 LTS since 2012.  We have periodically stopped and restarted the system without problems and haven't needed to for a year now, but on a restart (stop-jira.sh / start-jira.sh) today it will not start back up, and we get the following error in the logs:

17-Nov-2015 11:03:15 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.atlassian.jira.startup.LauncherContextListener
java.lang.NoClassDefFoundError: Could not initialize class com.atlassian.jira.servlet.JiraCaptchaServiceImpl
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
        at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:100)
        at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200)
        at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
        at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222)
        at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198)
        at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
        at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222)
        at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198)
        at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
        at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
        at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
        at com.atlassian.jira.ComponentContainer.getComponentInstance(ComponentContainer.java:105)
        at com.atlassian.jira.ComponentContainer$Registry.getComponents(ComponentContainer.java:334)
        at com.atlassian.jira.ComponentContainer$HostComponentProviderImpl.provide(ComponentContainer.java:124)
        at com.atlassian.jira.multitenant.MultiTenantHostComponentProvider.provide(MultiTenantHostComponentProvider.java:31)
        at com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.collectHostComponents(FelixOsgiContainerManager.java:463)
        at com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager.start(FelixOsgiContainerManager.java:231)
        at com.atlassian.jira.plugin.JiraOsgiContainerManager.start(JiraOsgiContainerManager.java:79)
        at com.atlassian.jira.ComponentManager.runStartable(ComponentManager.java:277)
        at com.atlassian.jira.ComponentManager.startJIRA(ComponentManager.java:242)
        at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:209)
        at com.atlassian.jira.ComponentManager.start(ComponentManager.java:194)
        at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:23)

From the documentation I can find, it may be to do with file permissions for one of the jar files used on startup, but I have checked the ones in atlassian-jira/WEB-INF/lib and bin and they are all the owned by the 'jira' user. 

It is also perhaps due to the version of Java running (1.6.0_36, OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~12.04)) - which the JIRA documentation says is unsupported, but it's been happily using this for years so I'm unsure about that being the issue.

There have been no changes to the server or the configuration that I can find.

Please can anyone help as this is our main project development tool.  If we should use a different version to the OpenJDK on ubuntu, please let us know which one to use.

 

1 answer

1 vote
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2015

Hi Sam, 

The first thing you should try is use a supported version of JAVA. As you can see on this documentation https://confluence.atlassian.com/display/JIRA051/Supported+Platforms, Oracle JAVA 1.6 update 16 should be the correct one (not OpenJDK).  

You probably started to get this issue after some new plugin has been installed and is crashing due system due you are using a unsupported JAVA version (only my theory). 

Cheers, 
Renato Rudnicki 

sam walbank November 17, 2015

Hi Renato, Thanks for your quick response. We have managed to solve the issue by performing manual backups of the jira database through mysqldump and gzipping the attachments folder, then restoring an old image of the server it was running on. We then restored the db and attachments, deleted the /var/jira-home/caches/indexes/* folders (except plugins) and then logged back into JIRA. Finally we did a re-index and everything is back to normal. If it goes wrong again we will try your suggestion. Sam

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events