Error When Uploading Global Logo
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
When inserting a global logo, an error is reported when clicking save.
There were errors uploading this logo. There is more information in the logs.
The following appears in the atlassian-confluence.log
:
ERROR [http-80-9] [confluence.plugins.lookandfeel.EditSiteLogoAction] doUpload There were errors uploading this logo. There is more information in the logs.
-- referer: http://localhost/admin/sitelogo/upload.action | url: /admin/sitelogo/upload.action | userName: admin | action: upload
java.lang.RuntimeException: Error opening input stream from resource: UploadedResource[filename: 'atl.site.logo', file: '\Atlassian\Application Data\Confluence\temp\scaledImages\upload__6d5c001a_13f3c86e042__7f65_00000033.tmp']
at com.atlassian.confluence.pages.DefaultFileUploadManager.storeResources(DefaultFileUploadManager.java:146)
at com.atlassian.confluence.pages.DefaultFileUploadManager.storeResource(DefaultFileUploadManager.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)...
Caused by: java.io.FileNotFoundException: Atlassian\Application Data\Confluence\temp\scaledImages\upload__6d5c001a_13f3c86e042__7f65_00000033.tmp (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
ERROR [http-80-6] [atlassian.confluence.pages.DefaultAttachmentManager] getAttachmentData Could not find data for attachment: Attachment: atl.site.logo v.1 (1867780) null - No AttachmentData object was returned when it was expected for attachment: Attachment: atl.site.logo v.1 (1867780) null
-- referer: http://localhost/admin/sitelogo/upload.action | url: /s/en_GB-1988229788/4108/b47156ace146e4f759b49ef98258cb637bdd5af8.23/_/images/logo/confluence-logo.png | userName: admin
ERROR [http-80-6] [[Standalone].[localhost].[/].[default]] log Servlet.service() for servlet default threw exception
-- referer: http://localhost/admin/sitelogo/upload.action | url: /s/en_GB-1988229788/4108/b47156ace146e4f759b49ef98258cb637bdd5af8.23/_/images/logo/confluence-logo.png | userName: admin
java.lang.NullPointerException
at com.atlassian.plugin.servlet.util.LastModifiedHandler.calculateLastModifiedDate(LastModifiedHandler.java:54)
at com.atlassian.plugin.servlet.util.LastModifiedHandler.checkRequest(LastModifiedHandler.java:71)
Cause
This might be related to CONFSERVER-21439 - Content must not be null error when uploading global logo
Resolution
- Reset the global logo to default
- Connect to the database
- Run the following query:
For Confluence 5.6.6 and below
delete from attachments where title = 'alt.site.logo';
For Confluence 5.7 and above
delete from content where title = 'alt.site.logo';
- Attempt to upload the global logo again from the UI.
You might note in newer versions that the auto theme coloring does not take when you alter the logo this time. This is most likely due to a flag in the database not being reset.