0

I developed a simple plugin to bar files ending in .exe from being uploaded into my jira app. I overrode the AttachFile.doValidation() method to check for .exe in the filename. If it's there I return an error.

Now when I try to delete an attachment, 9 times out of 10 it won't work. I simply get the error "Failed to delete attachment with id {id}". Nothing in the stacktrace or logs indicated that something went wrong. Then it will suddenly delete succcessfully. I've found no rhyme or reason for this.

Again, I overrode AttachFile, not DeleteAttachment, so I don't know how my fix could be related to this problem. Could it be though??


If I remove my plugin entirely, I still get an error when I delete. The error says "The action can't be completed because the file is open in Java(TM) Platform SE binary". Somehow AttachFile() is leaving a reference to the file, but I have no clue where or how to clean up.

Permissions aren't the issue, because occasionally the delete command will work. It always works when the server first starts up, and after that only periodically.

CNDyson
  • 1,687
  • 7
  • 28
  • 63

1 Answers1

0

We've come to the conclusion that this is a Windows-only problem, and Linux doesn't lock files. Our production server is Linux, so I'm not going to spend anymore time on this.

CNDyson
  • 1,687
  • 7
  • 28
  • 63