Issue with attachment will not load after creation
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
Summary
After creating an issue with an attachment, it can not be opened and spins indefinitely with stuck threads observed in the atlassian-jira.log.
Environment
Jira Server and Data Center
Diagnosis
A newly created issue that contains an attachment can't be opened.
In the atlassian-jira.log, observe stuck threads on jira/rest/jddap/1.0/attachment:
1
12-Aug-2022 08:49:41.305 WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8080-exec-36 url: /jira/rest/jddap/1.0/attachment; user: xxx] (id=[xxx]) has been active for [129,807] milliseconds (since [8/12/22 8:47 AM]) to serve the same request for [https://<baseURL>/jira/rest/jddap/1.0/attachment]
Looking at the catalina.out log, we observe the following:
1 2 3 4
Exception in thread "file-attachment-store:thread-2791" java.lang.NoClassDefFoundError: Could not initialize class com.sun.imageio.plugins.jpeg.JPEGImageReader at com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi.createReaderInstance(JPEGImageReaderSpi.java:85) at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderSpi.createReaderInstance(JPEGImageReaderSpi.java:110)
On the command line, run
java -version
and confirm that the version is different than what is listed in the Java Version section of https://<yourjirasite>/secure/admin/ViewSystemInfo.jspa.
Cause
This error happens when Java is updated without shutting down Jira first, which results in Jira pointing to a Java path that no longer exists. This triggers the NoClassDefFoundError.
Solution
If the version of Java is supported by the application, you can restart Jira. If unsupported, update the path back to the supported Java version following How to change the Java version used by Jira. If you restart with an unsupported Java version, Jira startup will fail.
Was this helpful?