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.

Cheers,
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

639 views 6 12
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