Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

attachTemporaryFile throws a 500?

David Orazine September 27, 2019

Running this command:

curl.exe -D- -u xxxxx@xxxxx.com:xxxxxxxxx -X POST -H "X-ExperimentalApi: opt-in" -H "X-Atlassian-Token: no-check" -F "file=c:\data.txt" https://xxxxx.atlassian.net/rest/servicedeskapi/servicedesk/1/attachTemporaryFile

I get the following error:

500java.lang.NullPointerException at com.atlassian.servicedesk.api.rest.resource.assembler.TemporaryFileAssemblerImpl.getFilename(TemporaryFileAssemblerImpl.java:204) at com.atlassian.servicedesk.api.rest.resource.assembler.TemporaryFileAssemblerImpl.createTemporaryAttachment(TemporaryFileAssemblerImpl.java:157) at com.atlassian.servicedesk.api.rest.resource.assembler.TemporaryFileAssemblerImpl.createTemporaryAttachments(TemporaryFileAssemblerImpl.java:120) at com.atlassian.servicedesk.api.rest.resource.assembler.TemporaryFileAssemblerImpl.lambda$attachTemporaryFiles$1(TemporaryFileAssemblerImpl.java:81) at com.atlassian.pocketknife.step.EitherStep2.lambda$null$0(EitherStep2.java:20) at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:886) at io.atlassian.fugue.Either.flatMap(Either.java:231) at com.atlassian.pocketknife.step.EitherStep2.lambda$then$1(EitherStep2.java:20) at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:886) at io.atlassian.fugue.Either.flatMap(Either.java:231) at com.atlassian.pocketknife.step.EitherStep2.then(EitherStep2.java:20) at com.atlassian.servicedesk.api.rest.resource.assembler.TemporaryFileAssemblerImpl.attachTemporaryFiles(TemporaryFileAssemblerImpl.java:81) at com.atlassian.servicedesk.api.rest.resource.TemporaryFileResource.attachTemporaryFile(TemporaryFileResource.java:83) 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:498) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:253) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:94) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.servicedesk.internal.api.language.LanguageOverrideInterceptor.intercept(LanguageOverrideInterceptor.java:38) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.jira.rest.api.analytics.AnalyticsInterceptor.invokeInterceptor(AnalyticsInterceptor.java:66) at com.atlassian.jira.rest.api.analytics.AnalyticsInterceptor.intercept(AnalyticsInterceptor.java:54) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:53) at com.atlassian.servicedesk.api.rest.util.uri.context.RequestScopeInterceptor.enterRequestScope(RequestScopeInterceptor.java:59) at com.atlassian.servicedesk.api.rest.util.uri.context.RequestScopeInterceptor.lambda$enterRequestScopeInvocation$0(RequestScopeInterceptor.java:45) at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:140) at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runInContext(ReentrantThreadLocalBasedCodeContext.java:63) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runInCustomerContext(CustomerContextServiceImpl.java:39) at sun.reflect.GeneratedMethodAccessor4803.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) 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:186) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor$1.run(ServiceTCCLInterceptor.java:61) at

Removed rest of stack trace because limits.

I am not sure what to do here, any help is appreciated .

Thanks in advance!

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
David Orazine September 27, 2019

I needed an @ symbol before the file name 

TAGS
AUG Leaders

Atlassian Community Events