JIRA throws an exception (500) when attaching SQL file

When attempting to attach a text file containing SQL, JIRA throws a 500 exception. In the JIRA/logs directory, the latest excption contains:

Caused by: java.text.ParseException: Expected separator '/' instead of '\'

The complete error is attached.

This has not happened before. In fact this file was also attached to an issue previously.

Do I just need to restart the server?

(Platform:JIRA v5.0.6 - Windows Server 2008 - Tomcat) (localhost.2012-08-09.log)

2 answers

1 accepted

Hi David,

First thing first, double check if there are any firewall in front of JIRA that might restrict any sql file to go trough as it might think that this is an SQL attack and the firewall trying to prevent it.

Second cause is due to incorrect MIME type reported to the browser. This might cause by pgSQL Admin on the victim machine had written a MIME type text\plain instead of text/plain into the Windows registry. Please try the following steps to fix it:

  1. Open your regedit program on the Windows machine
  2. Seach for the string "text\plain"
  3. If found, check for the presence of PgSQL Admin and remove it

Hope it helps.

Septa Cahyadiputra

Perfect! Hit the nail right on the head. It was the text\plain that caused the problem after installling pgAdmin III. I simply updated the Registry value as advised and I can now attach SQL files to JIRA issues again.

Even more puzzling now after a little experimentation. Previously, the file I was attempting to attach had the file name V_SPECIMEN_ACTION_RECORDS.SQL. When I changed the name of the file to V_SPECIMEN_ACTION_RECORDS.SQL.TXT JIRA no longer throws the exception.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,180 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you