Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-34720

JIRA gives 500 error when trying to upload a file larger than the max attachment size

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Steps to reproduce:

      • Try to attach a file to an issue with a file that is larger than the configured maximum attachment size.

      Expected results:

      • The upload should not even be attempted, with the following error being returned:

        MYFILE.EXT is too large to attach. Attachment is 13.75 MB but the largest allowed attachment is 10.00 MB.

      Actual results:

      • The upload proceeds.
      • The following error is presented:

        Cannot attach file MYFILE.EXT: Unknown server error (500).

      • The following stack trace is produced:
        2013-09-09 11:59:06,186 TP-Processor2 ERROR sysadmin 719x4534x1 1jbsie1 200.210.150.226,131.103.26.193 /rest/internal/1.0/AttachTemporaryFile [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
        com.atlassian.jira.util.dbc.Assertions$NullArgumentException: contentType should not be null!
        	at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:29)
        	at com.atlassian.jira.util.dbc.Assertions.notBlank(Assertions.java:122)
        	at com.atlassian.jira.web.util.DefaultWebAttachmentManager.createTemporaryAttachment(DefaultWebAttachmentManager.java:143)
        	at sun.reflect.GeneratedMethodAccessor1111.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
        	at $Proxy354.createTemporaryAttachment(Unknown Source)
        	at sun.reflect.GeneratedMethodAccessor1110.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	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 $Proxy1089.createTemporaryAttachment(Unknown Source)
        	at com.atlassian.jira.rest.v1.attachment.AttachTemporaryFileResource.addTemporaryAttachment(AttachTemporaryFileResource.java:114)
        	...
        

      I know that this was not happening in 6.1-OD-04-1 but I'm not sure exactly which version introduced this problem.

      Attachments

        Issue Links

          Activity

            People

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              mknight@atlassian.com Michael Knight
              Votes:
              8 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

                Created:
                Updated: