com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist

Atlassian JIRA | Zaël Graignic | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When I try to import an issue with 2 attachments and when these 2 attachments have the same name, JSON importer fails whereas the import is successful with the CSV importer. Example of the attachment part in JSON: "attachments" : [{ "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-04-30T13:51:11.400+0000", "uri" : "file://TeamPulse-attachment-598.docx" }, { "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-07-22T06:55:37.253+0000", "uri" : "file://TeamPulse-attachment-707.docx" } ], Example of the attachment part in CSV: id;Type;Status;summary;attachment1;attachment2 1;Bug;CLOSED;Summary;"2014-04-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-598.docx";"2014-05-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-707.docx" The exception in the log is the following: 2014-07-23 14:36:09,204 ERROR - Failed to attach attachments to issue TODIMP-6 com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:354) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:1010) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:830) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:400) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250) at java.lang.Thread.run(Thread.java:744) Caused by: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:524) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:459) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentBean(DefaultAttachmentManager.java:423) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:393) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:417) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:405) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy329.createAttachment(Unknown Source) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy965.createAttachment(Unknown Source) at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:338) When logging the java file activity, it appears that the JSON importer is using the same temporary file for both attachments whereas it uses different temporary files when the 2 attachments on the same issue have different names (i.e. Doc1.docx and Doc2.docx).

    Atlassian JIRA | 3 years ago | Zaël Graignic
    com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist
  2. 0

    When I try to import an issue with 2 attachments and when these 2 attachments have the same name, JSON importer fails whereas the import is successful with the CSV importer. Example of the attachment part in JSON: "attachments" : [{ "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-04-30T13:51:11.400+0000", "uri" : "file://TeamPulse-attachment-598.docx" }, { "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-07-22T06:55:37.253+0000", "uri" : "file://TeamPulse-attachment-707.docx" } ], Example of the attachment part in CSV: id;Type;Status;summary;attachment1;attachment2 1;Bug;CLOSED;Summary;"2014-04-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-598.docx";"2014-05-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-707.docx" The exception in the log is the following: 2014-07-23 14:36:09,204 ERROR - Failed to attach attachments to issue TODIMP-6 com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:354) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:1010) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:830) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:400) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250) at java.lang.Thread.run(Thread.java:744) Caused by: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:524) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:459) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentBean(DefaultAttachmentManager.java:423) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:393) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:417) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:405) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy329.createAttachment(Unknown Source) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy965.createAttachment(Unknown Source) at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:338) When logging the java file activity, it appears that the JSON importer is using the same temporary file for both attachments whereas it uses different temporary files when the 2 attachments on the same issue have different names (i.e. Doc1.docx and Doc2.docx).

    Atlassian JIRA | 3 years ago | Zaël Graignic
    com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist

    Root Cause Analysis

    1. com.atlassian.jira.web.util.AttachmentException

      Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist

      at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk()
    2. com.atlassian.jira
      DefaultAttachmentManager.createAttachment
      1. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:524)
      2. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:459)
      3. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentBean(DefaultAttachmentManager.java:423)
      4. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:393)
      5. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:417)
      6. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:405)
      6 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. com.atlassian.plugin
      DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      1 frame
    5. com.sun.proxy
      $Proxy329.createAttachment
      1. com.sun.proxy.$Proxy329.createAttachment(Unknown Source)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    7. Spring AOP
      AopUtils.invokeJoinpointUsingReflection
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      1 frame
    8. Spring OSGi Core
      ServiceInvoker.invoke
      1. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      2. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      2 frames
    9. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      4 frames
    10. Spring OSGi Core
      ServiceTCCLInterceptor.invoke
      1. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      2. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      2 frames
    11. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      1 frame
    12. Spring OSGi Core
      LocalBundleContextAdvice.invoke
      1. org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      1 frame
    13. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      5. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      5 frames
    14. com.sun.proxy
      $Proxy965.createAttachment
      1. com.sun.proxy.$Proxy965.createAttachment(Unknown Source)
      1 frame
    15. com.atlassian.jira
      ExternalUtils.attachFile
      1. com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:338)
      1 frame