java.lang.NullPointerException: Cannot invoke method getJqlFunction() on null object

JIRA | Alex Taylor | 3 years ago
  1. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-270].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}I have a custom field which evaluates the following query and displays the results on the view-issue screen: {code} issueFunction in subtasksOf("issueFunction in parentsOf(\"issueKey = RLINK\")") AND issueKey != RLINK {code} The field is a 'Query issue related custom field' from the https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.lf.queryfields plugin and this automatically substitutes the current issue-key for the 'RLINK' parameters in the above. I've verified that the final query being passed to the search-engine is valid. Every now and then this causes an NPE to be thrown when rendering the page: {code} [jira.web.component.ModuleWebComponentImpl] Error rendering web panel: com.atlassian.jira.jira-view-issue-plugin:details-module (null) java.lang.NullPointerException: Cannot invoke method getJqlFunction() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.jql.ScriptedFunctionClauseFactory.getQuery(ScriptedFunctionClauseFactory.groovy:43) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:155) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:91) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.query.QueryVisitor.createQuery(QueryVisitor.java:72) at com.atlassian.jira.jql.query.DefaultLuceneQueryBuilder.createLuceneQuery(DefaultLuceneQueryBuilder.java:39) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.createLuceneQuery(LuceneSearchProvider.java:265) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:190) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:312) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:82) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:77) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:117) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) at $Proxy234.search(Unknown Source) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy234.search(Unknown Source) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at $Proxy234.search(Unknown Source) at ru.mail.jira.plugins.lf.LinkedField.getVelocityParameters(LinkedField.java:166) {code} There doesn't seem to be any obvious reason for the failure. Restarting JIRA invariably clears it up, although it's also been known to go away on its own after some time.

    JIRA | 3 years ago | Alex Taylor
    java.lang.NullPointerException: Cannot invoke method getJqlFunction() on null object
  2. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-270].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}I have a custom field which evaluates the following query and displays the results on the view-issue screen: {code} issueFunction in subtasksOf("issueFunction in parentsOf(\"issueKey = RLINK\")") AND issueKey != RLINK {code} The field is a 'Query issue related custom field' from the https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.lf.queryfields plugin and this automatically substitutes the current issue-key for the 'RLINK' parameters in the above. I've verified that the final query being passed to the search-engine is valid. Every now and then this causes an NPE to be thrown when rendering the page: {code} [jira.web.component.ModuleWebComponentImpl] Error rendering web panel: com.atlassian.jira.jira-view-issue-plugin:details-module (null) java.lang.NullPointerException: Cannot invoke method getJqlFunction() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.jql.ScriptedFunctionClauseFactory.getQuery(ScriptedFunctionClauseFactory.groovy:43) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:155) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:91) at com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.query.QueryVisitor.createQuery(QueryVisitor.java:72) at com.atlassian.jira.jql.query.DefaultLuceneQueryBuilder.createLuceneQuery(DefaultLuceneQueryBuilder.java:39) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.createLuceneQuery(LuceneSearchProvider.java:265) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:190) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:312) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:82) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:77) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:117) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) at $Proxy234.search(Unknown Source) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy234.search(Unknown Source) at sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at $Proxy234.search(Unknown Source) at ru.mail.jira.plugins.lf.LinkedField.getVelocityParameters(LinkedField.java:166) {code} There doesn't seem to be any obvious reason for the failure. Restarting JIRA invariably clears it up, although it's also been known to go away on its own after some time.

    JIRA | 3 years ago | Alex Taylor
    java.lang.NullPointerException: Cannot invoke method getJqlFunction() on null object
  3. 0

    Scripted JQL Functions With Comments - Script Runner - Confluence

    atlassian.net | 6 months ago
    java.lang.NullPointerException: Cannot invoke method toLowerCase() on null object
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JENKINS-15309] NPE (isEmpty) from main.groovy - Jenkins JIRA

    jenkins-ci.org | 3 weeks ago
    javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar: <st:include> Cannot invoke method isEmpty() on null object
  6. 0

    Built-In Scripts With Comments - Script Runner - Confluence

    atlassian.net | 4 months ago
    java.lang.NullPointerException: Cannot invoke method next() on null object

  1. mortalman7 2 times, last 5 months ago
  2. rlovtangen 1 times, last 6 months ago
22 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Cannot invoke method getJqlFunction() on null object

    at org.codehaus.groovy.runtime.NullObject.invokeMethod()
  2. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
    2. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    4. org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
    5. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    6. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
    7. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    7 frames
  3. com.onresolve.jira
    ScriptedFunctionClauseFactory.getQuery
    1. com.onresolve.jira.groovy.jql.ScriptedFunctionClauseFactory.getQuery(ScriptedFunctionClauseFactory.groovy:43)
    1 frame
  4. com.atlassian.jira
    QueryVisitor.visit
    1. com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:155)
    2. com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25)
    2 frames
  5. com.atlassian.query
    TerminalClauseImpl.accept
    1. com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137)
    1 frame
  6. com.atlassian.jira
    QueryVisitor.visit
    1. com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:91)
    2. com.atlassian.jira.jql.query.QueryVisitor.visit(QueryVisitor.java:25)
    2 frames
  7. com.atlassian.query
    AndClause.accept
    1. com.atlassian.query.clause.AndClause.accept(AndClause.java:34)
    1 frame
  8. com.atlassian.jira
    DefaultSearchService.search
    1. com.atlassian.jira.jql.query.QueryVisitor.createQuery(QueryVisitor.java:72)
    2. com.atlassian.jira.jql.query.DefaultLuceneQueryBuilder.createLuceneQuery(DefaultLuceneQueryBuilder.java:39)
    3. com.atlassian.jira.issue.search.providers.LuceneSearchProvider.createLuceneQuery(LuceneSearchProvider.java:265)
    4. com.atlassian.jira.issue.search.providers.LuceneSearchProvider.getHits(LuceneSearchProvider.java:190)
    5. com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:312)
    6. com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:82)
    7. com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:77)
    8. com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:117)
    8 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  10. com.atlassian.multitenant
    MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke
    1. com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
    2. com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211)
    2 frames
  11. Unknown
    $Proxy234.search
    1. $Proxy234.search(Unknown Source)
    1 frame
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  13. com.atlassian.plugin
    DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
    1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
    1 frame
  14. Unknown
    $Proxy234.search
    1. $Proxy234.search(Unknown Source)
    1 frame
  15. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor569.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  16. com.atlassian.plugin
    HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke
    1. com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
    1 frame
  17. Unknown
    $Proxy234.search
    1. $Proxy234.search(Unknown Source)
    1 frame
  18. ru.mail.jira
    LinkedField.getVelocityParameters
    1. ru.mail.jira.plugins.lf.LinkedField.getVelocityParameters(LinkedField.java:166)
    1 frame