Cannot upload SQL files to JIRA on Windows

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

Symptoms

  1. All attempts to upload SQL files to issues fail

  2. Attempts generate red error text: Unknown Server Error (500).

The following appears in the atlassian-jira.log:

1 java.lang.IllegalArgumentException: Error parsing media type 'text\plain'

Diagnosis

This issue is typically seen in clients that have pgAdmin installed.

Cause

This is caused by incorrect MIME handling by Windows. When installed, the pgAdmin program associates the .SQL file extension with 'text\plain' instead of the traditional 'text/plain'.

Solution

Resolution

  1. Remove pgAdmin from your system as this is the root cause of the problem

  2. Note, this has not been throughly tested, attempt this at your own risk: It is possible to fix these in the database, before an attempt as this please shut down JIRA and backupyour database, then attempt the fix:

    1. Perform the following select on your database:

      1 select * from fileattachment where filename like '%.sql' and mimetype = 'text\plain';
    2. Review the results to ensure these are the problematic files

    3. Perform the following update on your database:

      1 update fileattachment set mimetype = 'text/plain' where filename like '%.sql' and mimetype = 'text\plain';
  3. While we cannot recommend it, there is some possibility that a registry edit would be able to resolve this issue.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.