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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

attachTemporaryFile throws a 500?

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

0 votes
Answer accepted

I needed an @ symbol before the file name 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

157 views 3 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you