Jelly script file attachment error: Unable to make temporary copy of file: java.io.PrintWriter@7ad91818
I have tried:
1. back-slash and forward slash in the path
2. checked the file permissions
3. changed the file locations and finally changed the computer.
I get the same error everywhere.
I know that there is another question: https://answers.atlassian.com/questions/39717/issue-in-attachment-creation-in-jira-using-jelly but that is yet unanswered.
I can create a defect manually and attach the same files in the manually created defects, but it fails in Jelly script.
Can anyone shed some light on this issue?
I get this error too. It's always because I've got the path wrong on the file. Could you show us two things please?
I tried:
<jira:AttachFile key="${key}" filepath="E:/Template/Bug.jpg" option="override"/>
then this:
<jira:AttachFile key="${key}" filepath="E:\Template\Bug.jpg" option="override"/>
I got the same error:
Exception: org.apache.commons.jelly.JellyTagException: null:3:0: Unable to make temporary copy of file. java.io.PrintWriter@665bfdf8
The location of the file is: E:\Template\Bug.jpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, the second one looks right to me, but I have a nagging doubt that you might need to escape the backslashes in the path - try E:\\Template\\Bug.jpg
Also, can you check that the user running the Jira service has full read/write access to the Bug.jpg file on the server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
E:\\Template\\Bug.jpg ---Tried this too.
In the 2nd line in your comment: I am running Jelly script from my PC (so I have access rights). And I have System Admin rights in JIRA. Also, I could create a defect manually, with the same file as attachment.
Is manual issue creation any different from Jelly script creation? If so, then what should change: "Reporter"?
I have tried creating a bug first and then adding an attachment- as in a different Jelly script, not in the same one. That fails too. So, I assume it has something to with the access permission. But what could be above SysAdmin?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, hang on, I think you've missed something. I said to check
I have a feeling e:\template\bug.jpg is on your machine, and not the server? The files you are trying to attach must be on the Jira server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic: So, the real issue was "file on the server". Yes, I did miss that. I think my problem is solved now. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.