JIRA throws an exception (500) when attaching SQL file

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2012

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

4 votes
Answer accepted
Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2012

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.

Cheers,
Septa Cahyadiputra

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2012

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.

0 votes
David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2012

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