Uploaded image for project: 'Elements Connect'
  1. Elements Connect
  2. CO-3624

NullPointerException error logged when a Live text legacy field query does not return any result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.7, 6.0.8
    • Fix Version/s: 6.0.9
    • Labels:
      None
    • Functional components:
      Custom field - Live text legacy
      Runtime - Field Edition

      Description

      How to reproduce

      • Create a "Live Text (legacy)" field
      • Set a query that does not return any result, ex:
        • DS: Jira JQL
        • Query: priority = Low and priority = High
        • Any editor, default template (summary)
      • Add the legacy field to a create issue screen
      • Create an issue
      • Set a summary
      • Click on create

      Current

      The issue is created, but we have a stack trace in the logs:

      2019-08-23 08:54:27,746 http-nio-8080-exec-7 ERROR admin 534x8063x1 1r9pfu5 83.118.198.126 /secure/QuickCreateIssue.jspa [c.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
      java.lang.NullPointerException
              at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
              at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
              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.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
              at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
              at com.valiantys.jira.plugins.sql.customfield.TemplateHelper.getFormValues(TemplateHelper.java:174)
              at com.valiantys.jira.plugins.sql.customfield.TemplateHelper.adaptFormInput(TemplateHelper.java:150)
              ... 2 filtered
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)
              at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)
              at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28)
              at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
              at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
              at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
              at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
              at org.apache.velocity.Template.merge(Template.java:328)
              at org.apache.velocity.Template.merge(Template.java:235)
              at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
              at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117)
              at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97)
              at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:122)
              at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEngine.java:113)
              at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.writeHtml(AbstractJiraModuleDescriptor.java:127)
              at com.atlassian.jira.plugin.AbstractJiraModuleDescriptor.getHtml(AbstractJiraModuleDescriptor.java:106)
              at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getHtml(CustomFieldTypeModuleDescriptorImpl.java:310)
              at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$2.call(CustomFieldTypeModuleDescriptorImpl.java:180)
              at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl$2.call(CustomFieldTypeModuleDescriptorImpl.java:172)
              at com.atlassian.ozymandias.SafePluginPointAccess.call(SafePluginPointAccess.java:390)
              at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getSupplierValueOrHtmlErrorMessage(CustomFieldTypeModuleDescriptorImpl.java:372)
              at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptorImpl.getEditHtml(CustomFieldTypeModuleDescriptorImpl.java:172)
              at com.atlassian.jira.issue.fields.ImmutableCustomField.getEditHtml(ImmutableCustomField.java:890)
              at com.atlassian.jira.issue.fields.ImmutableCustomField.getCreateHtml(ImmutableCustomField.java:876)
              at com.atlassian.jira.issue.fields.screen.AbstractFieldScreenLayoutItem.getCreateHtml(AbstractFieldScreenLayoutItem.java:68)
              at com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItemImpl.getCreateHtml(FieldScreenRenderLayoutItemImpl.java:42)
              at com.atlassian.jira.issue.fields.rest.FieldHtmlFactoryImpl$FieldRenderItemWithTab.getCreateHtml(FieldHtmlFactoryImpl.java:390)
              at com.atlassian.jira.issue.fields.rest.FieldHtmlFactoryImpl.renderCreateFields(FieldHtmlFactoryImpl.java:126)
              at com.atlassian.jira.issue.fields.rest.FieldHtmlFactoryImpl.getCreateFields(FieldHtmlFactoryImpl.java:92)
              ... 2 filtered
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
              at com.sun.proxy.$Proxy536.getCreateFields(Unknown Source)
              ... 2 filtered
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131)
              at com.sun.proxy.$Proxy536.getCreateFields(Unknown Source)
              at com.atlassian.jira.quickedit.action.QuickCreateIssue.getCreateFields(QuickCreateIssue.java:255)
              at com.atlassian.jira.quickedit.action.QuickCreateIssue.doDefault(QuickCreateIssue.java:213)
              at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:356)
              ... 1 filtered
              at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
              ... 7 filtered
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
              ... 48 filtered
              at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55)
              ... 4 filtered
              at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
              ... 12 filtered
              at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
              ... 62 filtered
              at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
              ... 1 filtered
              at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
              ... 39 filtered
              at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
              ... 5 filtered
              at com.valiantys.jira.plugins.sql.service.servletcontext.ContextListenerServletFilter.doFilter(ContextListenerServletFilter.java:24)
              ... 3 filtered
              at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:173)
              at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136)
              at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89)
              at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47)
              at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:166)
              at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:122)
              at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:113)
              ... 4 filtered
              at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
              ... 8 filtered
              at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
              ... 4 filtered
              at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
              ... 26 filtered
              at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
              ... 25 filtered
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:748)
      

      Under certain circumstances (we could not reproduce this error), the field value in Jira DB contains the error

      The consequence is that this error message is visible when the issue is displayed ("Value not found" fallback)

      Expected

      The issue is created, the legacy field is empty, no error in the logs

      Impact

      In the case where only the error is logged, the impact is low
      however, if the error is saved in the custmfieldvalue table in Jira DB, the error message is displayed in the issue view (and the connect field is not considered as empty) - it can lead to misunderstanding among Jira users

      Workaround

      The bugs appeared with Elements Connect 6.0.7.
      If you are affected, you can downgrade to any 6.0.X version < 6.0.7

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nicolas.esteves@valiantys.com Nicolas Esteves
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: