500 error when trying to create a request from the Service Management Customer Portal

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

   

Summary

In Jira Service Management, when clicking on some (or all) request types from the Customer portal, either of the 3 following behaviours occurs:

  • nothing happens when clicking on the request type
  • a 500 error is thrown in the UI when clicking on the request type
  • the request creation form opens, but when submitting the form, nothing happens 

(info) Note that there is a separate KB article which also addresses the "500 error" thrown in the customer portal. If the diagnosis steps from this KB article do not apply to your situation, please take a look at the other KB article Jira Service Management shows 500 error on "Requests" page, which might be relevant.

Environment

Any Jira Service Management (JSM) version from 4.0.0

Diagnosis

  • The following 500 error might be thrown in the UI:

    Technical details
    Log's referral number: XXXXXXXXXX
     
    Cause
    Referer URL: <Jira_Base_URL>/plugins/servlet/desk/portal/1/create/2
    java.lang.NullPointerException
    java.lang.NullPointerException
            at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) [catalina.jar:8.5.60]
            at com.intenso.jira.plugins.servlet.filter.utils.FilterUtils.writeToResponse(FilterUtils.java:27) [?:?]
            at com.intenso.jira.plugins.servlet.filter.RequestSecurityFilter.proceedRequest(RequestSecurityFilter.java:84) [?:?]
            at com.intenso.jira.plugins.servlet.filter.RequestSecurityFilter.doFilter(RequestSecurityFilter.java:44) [?:?]
            at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62) [atlassian-plugins-servlet-5.3.11.jar:?]
            at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) [atlassian-plugins-servlet-5.3.11.jar:?]
            at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57) [atlassian-plugins-servlet-5.3.11.jar:?]
            at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56) [?:?]
            at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62) [atlassian-plugins-servlet-5.3.11.jar:?]
            at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) [atlassian-plugins-servlet-5.3.11.jar:?]
    
    
  • Either of the following errors is thrown in the Jira application logs

    • Error 1:

      2021-10-06 16:57:10,552+0200 http-nio-8093-exec-2 ERROR julien 1017x742x1 XXXXX 0:0:0:0:0:0:0:1 /servicedesk/customer/portal/1/create/2 [c.a.p.i.util.runner.AuthenticationContextUtilImpl] Unexpected error while running action as user 'someuser'
      java.lang.NullPointerException
      	at com.atlassian.jira.issue.customfields.impl.UserCFType.validateFromParams(UserCFType.java:249)
      	at com.atlassian.jira.issue.fields.ImmutableCustomField.validateParams(ImmutableCustomField.java:705)
      	at com.atlassian.servicedesk.internal.feature.customer.request.data.validation.VisibleFieldValidator.performFieldValidationInJira(VisibleFieldValidator.java:112)
      	at com.atlassian.servicedesk.internal.feature.customer.request.data.validation.VisibleFieldValidator.performValidation(VisibleFieldValidator.java:98)
      	at com.atlassian.servicedesk.internal.feature.customer.request.data.validation.VisibleFieldValidator.lambda$validate$0(VisibleFieldValidator.java:70)
      	at io.atlassian.fugue.Option$None.fold(Option.java:393)
      	at io.atlassian.fugue.Option.orElse(Option.java:218)
      	at com.atlassian.servicedesk.internal.feature.customer.request.data.validation.VisibleFieldValidator.validate(VisibleFieldValidator.java:70)
      	at com.atlassian.servicedesk.internal.feature.customer.request.data.CustomerRequestDataManagerImpl.lambda$validateRequestTypeField$3(CustomerRequestDataManagerImpl.java:343)
      
      
    • Error 2:

      2022-02-14 14:54:14,232+0000 Caesium-1-3 ERROR HeatherPhillips     [c.a.p.i.util.runner.AuthenticationContextUtilImpl] Unexpected error while running action as user 'HeatherPhillips'
      java.lang.NullPointerException
      	at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(SelectCFType.java:223)
      	at com.atlassian.servicedesk.internal.fields.optionsprovider.SelectOptionsProvider.getDefaultValues(SelectOptionsProvider.java:67)
      	at com.atlassian.servicedesk.internal.fields.optionsprovider.SelectOptionsProvider.apply(SelectOptionsProvider.java:40)
      	at com.atlassian.servicedesk.internal.fields.ServiceDeskJIRAFieldServiceImpl$OptionsProvidersFunction.lambda$apply$1(ServiceDeskJIRAFieldServiceImpl.java:366)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      	at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
      	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
      	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
      	at com.atlassian.servicedesk.internal.fields.ServiceDeskJIRAFieldServiceImpl$OptionsProvidersFunction.apply(ServiceDeskJIRAFieldServiceImpl.java:367)
      	at com.atlassian.servicedesk.internal.fields.ServiceDeskJIRAFieldServiceImpl$OptionsProvidersFunction.apply(ServiceDeskJIRAFieldServiceImpl.java:342)
      	at com.atlassian.servicedesk.internal.feature.customer.request.requesttype.field.RequestTypeFieldInternalServiceImpl.createUserFieldView(RequestTypeFieldInternalServiceImpl.java:347)
      	at com.atlassian.servicedesk.internal.feature.customer.request.requesttype.field.RequestTypeFieldInternalServiceImpl.lambda$getUserFieldViewForRequestType$7(RequestTypeFieldInternalServiceImpl.java:210)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
  • The impacted request type is configured in the Service Management project (in Project Settings > Request Types) with a field which has an incorrect context configuration. For example:
    • the context does not include the issue type associated to the impacted request type
    • or the context does not include the Service Management project request type is configured in

Cause

There is a field in the Request Type configuration which has an incorrect context configuration. For the context to be properly configured and to ensure that the Request Type can be loaded in the customer portal, the context needs to include both:

  • the Service Management project this request is configured in
  • and the issue type associated to the impacted request type

In such case, the Request Type will fail to be loaded in the Customer Portal since the field needs to be available for both the project and the issue type via the context field configuration.

This issue is a side effect of the Service Management bug  JSDSERVER-7061 - Getting issue details... STATUS .

Please find below an example of incorrect context configuration for a field which is included in the Request Type:

  • the Request Type includes a field called "User Picker Field Test", and the Request type was created in the project SDBASIC and is linked to the issue type "IT Help"
  • the field "User Picker Field Test" is configured with a context which is missing both the project SDBASIC and the issue type "IT Help" (note that the issue will occur either project or the issue type is missing)

Solution

There are 2 possible workarounds to this issue:

  • either go to the context configuration of the problematic field (by looking for this field in the page ⚙ > Issues > Custom Fields), and make sure that the context includes both the Service Management project and the issue type linked to the request type
  • or go to the configuration of the impacted Request Type (via Project Settings > Request Types), click on Edit Fields, and remove the problematic field

 Note that it might not be easy to identify the problematic field. To identify which one is causing the issue, what you can do is:

  • Go to the configuration of the impacted Request Type (via Project Settings > Request Types)
  • Click on Edit Fields
  • Try to remove each field 1 by 1 (except for the summary field which is required)
  • After you remove each field, check if the error still happens
  • Once the error stops happening, then it means that the last field you removed was the problematic one



Last modified on Sep 5, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.