Issue with attachment will not load after creation
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
After creating an issue with an attachment, it can not be opened and spins indefinitely with stuck threads observed in the atlassian-jira.log.
Jira Server and Data Center
- 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:
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:
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 -versionand confirm that the version is different than what is listed in the Java Version section of https://<yourjirasite>/secure/admin/ViewSystemInfo.jspa.
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.
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.