We just upgraded to service desk 3.0 and JIRA Software. When a user attempts to upload an attachment from the customer portal, they receive the following error:
Cannot attach file: Unknown server error (500).
Here's what I see in the log at the same time:
/rest/servicedesk/1/servicedesk/customer/comment/tempfile [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.servicedesk.squalor.comment.ServiceDeskAttachmentManager.createTemporaryAttachment(ServiceDeskAttachmentManager.java:29) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16$$anonfun$apply$17.apply(InternalServiceDeskCommentService.scala:208) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16$$anonfun$apply$17.apply(InternalServiceDeskCommentService.scala:202) at scalaz.$bslash$div.map(Either.scala:111) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16.apply(InternalServiceDeskCommentService.scala:202) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1$$anonfun$apply$16.apply(InternalServiceDeskCommentService.scala:201) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1.apply(InternalServiceDeskCommentService.scala:201) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService$$anonfun$addTemporaryAttachment$1.apply(InternalServiceDeskCommentService.scala:200) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.comment.InternalServiceDeskCommentService.addTemporaryAttachment(InternalServiceDeskCommentService.scala:200) at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3$$anonfun$apply$4.apply(ServiceDeskCommentResource.scala:180) at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3$$anonfun$apply$4.apply(ServiceDeskCommentResource.scala:179) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3.apply(ServiceDeskCommentResource.scala:179) at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource$$anonfun$3.apply(ServiceDeskCommentResource.scala:178) at scalaz.$bslash$div.flatMap(Either.scala:134) at com.atlassian.servicedesk.internal.rest.ServiceDeskCommentResource.temporaryFileUploadAJAX(ServiceDeskCommentResource.scala:178) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) ... 19 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73) ... 41 filtered at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65) ... 64 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40) ... 21 filtered at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply$mcV$sp(PortalContextSetter.scala:12) at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11) at com.atlassian.servicedesk.internal.web.PortalContextSetter$$anonfun$doFilter$1.apply(PortalContextSetter.scala:11) at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23) at com.atlassian.servicedesk.internal.web.PortalContextSetter.doFilter(PortalContextSetter.scala:11) ... 56 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: size must be >= 0. at com.atlassian.jira.web.util.DefaultWebAttachmentManager.createTemporaryAttachment(DefaultWebAttachmentManager.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.proxy.$Proxy56.createTemporaryAttachment(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy4830.createTemporaryAttachment(Unknown Source) ... 241 more
This happens with any type of attachment and with a number of users. Any ideas?
I once saw a similar case where the problem was related to reverse proxy. Do you have a proxy in front of JIRA? From the error, it seems that the file is being sent as 0 bytes.
It might be worth to bypass it and see if the problem still reproduces.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.