JIRA Functionality Fails due to Incompatible magic value 0 in class file Error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
JIRA actions fail, such as creating issues.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
2013-07-17 01:29:00,714 http-bio-8443-exec-23 ERROR [500ErrorPage.jsp] Exception caught in 500 page Incompatible magic value 0 in class file com/atlassian/jira/workflow/function/issue/IssueCreateFunction
java.lang.ClassFormatError: Incompatible magic value 0 in class file com/atlassian/jira/workflow/function/issue/IssueCreateFunction
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2901)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170) <+2> (WebappClassLoader.java:1678) (WebappClassLoader.java:1556)
at com.atlassian.core.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:72)
at com.atlassian.core.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:50)
Cause
The ClassFormatError is thrown when the JVM finds the class file to be either malformed or it cannot interpret it. This would seem to imply there's a problem with the bytecode (this is the compiled version of the class). It is most commonly caused by incorrectly modifying the file, a failed un-compression attempt or corrupted download.
Resolution #1
Backup the file that is causing problems. In this example, it is
com/atlassian/jira/workflow/function/issue/IssueCreateFunction.class
.Download the appropriate version for your JIRA instance from http://www.atlassian.com/software/jira/download. Ensure this is an archive file (either a ZIP or tar.gz).
Expand the download and locate the file.
Replace the downloaded file with the corrupted file.
Restart JIRA.
Resolution #2
If the file cannot be found in the installation folder, it may be downloaded as a Maven dependency. In this case, it will be located in the plugin cache, and clearing that cache may resolve the issue. The instructions to clear the plugin cache may be found in the following KB: How to clear Jira's plugin cache. For convenience, they are also provided below.
Jira DC
To clear the plugin cache in a Jira DC cluster, you'll need to perform a rolling restart of all cluster nodes:
Stop Jira on the first node.
Clear the plugin cache on that node by removing the following directories:
<jira-local-home>/plugins/.bundled-plugins
<jira-local-home>/plugins/.osgi-plugins
<jira_install>/work
(just the contents, NOT the directory itself)<jira_install>/temp
(just the contents, NOT the directory itself)
Start Jira on that node.
Repeat these steps for the remaining nodes.
Jira Server
To clear the plugin cache on a Server or single-node DC instance:
Stop Jira.
Clear the plugin cache by removing the following directories:
<jira-home>/plugins/.bundled-plugins
<jira-home>/plugins/.osgi-plugins
<jira_install>/work
(just the contents, NOT the directory itself)<jira_install>/temp
(just the contents, NOT the directory itself)
Start Jira.
Was this helpful?