java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Steps to reproduce the bug: # Create a new Issue Type ({{Defunct Issue Type}}) # Create a new Custom Field ({{Bad Custom Field}}) and configure it to be enabled for {{Defunct Issue Type}} # Delete {{Bad Custom Field}} # Attempt to delete {{Defunct Issue Type}} - a 500 error page is displayed with a {{NullPointerException}}. Stack trace looks something like this: {noformat} java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:118) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.transformToDomainObject(FieldConfigSchemePersisterImpl.java:248) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getFieldConfigScheme(FieldConfigSchemePersisterImpl.java:176) at com.atlassian.jira.issue.fields.config.persistence.CachedFieldConfigSchemePersister.getFieldConfigScheme(CachedFieldConfigSchemePersister.java:54) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getInvalidFieldConfigSchemeAfterIssueTypeRemoval(FieldConfigSchemePersisterImpl.java:113) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.getInvalidFieldConfigSchemesForIssueTypeRemoval(FieldConfigSchemeManagerImpl.java:289) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.removeInvalidFieldConfigSchemesForIssueType(FieldConfigSchemeManagerImpl.java:273) at com.atlassian.jira.web.action.admin.issuetypes.DeleteIssueType.doExecute(DeleteIssueType.java:181) {noformat}
    via by Michael Tokar,
  • Steps to reproduce the bug: # Create a new Issue Type ({{Defunct Issue Type}}) # Create a new Custom Field ({{Bad Custom Field}}) and configure it to be enabled for {{Defunct Issue Type}} # Delete {{Bad Custom Field}} # Attempt to delete {{Defunct Issue Type}} - a 500 error page is displayed with a {{NullPointerException}}. Stack trace looks something like this: {noformat} java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:118) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.transformToDomainObject(FieldConfigSchemePersisterImpl.java:248) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getFieldConfigScheme(FieldConfigSchemePersisterImpl.java:176) at com.atlassian.jira.issue.fields.config.persistence.CachedFieldConfigSchemePersister.getFieldConfigScheme(CachedFieldConfigSchemePersister.java:54) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getInvalidFieldConfigSchemeAfterIssueTypeRemoval(FieldConfigSchemePersisterImpl.java:113) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.getInvalidFieldConfigSchemesForIssueTypeRemoval(FieldConfigSchemeManagerImpl.java:289) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.removeInvalidFieldConfigSchemesForIssueType(FieldConfigSchemeManagerImpl.java:273) at com.atlassian.jira.web.action.admin.issuetypes.DeleteIssueType.doExecute(DeleteIssueType.java:181) {noformat}
    via by Michael Tokar,
  • {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-184].{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}When copying a project, we got a NPE: {code} 2012-11-13 12:45:35,657 http-8100-2 ERROR alexander.vonrenteln 765x4466x1 vlvks8 10.17.60.137 /secure/admin/groovy/CannedScriptRunner.jspa [onresolve.jira.groovy.GroovyRunner] The script failed : java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:187) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManager$getFieldConfig.call(Unknown Source) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4_closure7_closure8.doCall(CopyProject.groovy:358) at sun.reflect.GeneratedMethodAccessor1212.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4_closure7.doCall(CopyProject.groovy:351) at sun.reflect.GeneratedMethodAccessor1211.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4.doCall(CopyProject.groovy:348) at sun.reflect.GeneratedMethodAccessor1209.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject.doCopyProject(CopyProject.groovy:347) at com.onresolve.jira.groovy.canned.admin.CopyProject$doCopyProject.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at com.onresolve.jira.groovy.canned.admin.CopyProject.doScript(CopyProject.groovy:219) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:57) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:47) at com.onresolve.jira.groovy.GroovyRunner$run.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at com.onresolve.jira.groovy.CannedScriptRunner.doExecute(CannedScriptRunner.groovy:233) at com.onresolve.jira.groovy.GroovyRunner.execute(GroovyRunner.java:341) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:221) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:150) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:104) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at com.atlassian.jira.web.filters.SitemeshPageFilter.doFilter(SitemeshPageFilter.java:124) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:234) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:157) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463) at com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) {code} After some debugging, we realized that the scriptrunner build-in script "copy project" expects the entries in the tables fieldconfiguration and fieldconfigscheme to be in sync and have the same ids. This is the case most of the time but in our instance this assumption is wrong. Hence, this plugin creates wrong connections in the table fieldconfigschemeissuetype which will then break JIRA (wrong casts etc.) Here is an excerpt of the groovy code: {code} // Set PROJECT CATEGORY projectManager.setProjectCategory (newprojectGV, projectManager.getProjectCategoryFromProject(srcProjectGV)) // SET CUSTOM FIELDS customFieldManager.getCustomFieldObjects().each {CustomField cf -> fieldConfigSchemeManager.getConfigSchemesForField(cf).each {FieldConfigScheme fcs -> if (!fcs.isGlobal()) { fcs.getAssociatedProjects().each {GenericValue project -> if (project.getLong("id") == srcProject.getId()) { log.debug (fcs.name + " associated with " + project.name + ", need to modify this") Long fcsId = fcs.id FieldConfigScheme cfConfigScheme = fieldConfigSchemeManager.getFieldConfigScheme(fcsId) FieldConfigScheme.Builder cfSchemeBuilder = new FieldConfigScheme.Builder(cfConfigScheme) FieldConfig config = fieldConfigManager.getFieldConfig(fcsId) {code} The last line will cause a NPE if the fcsId and the fcId are not in sync. This cannot be assumed because JIRA itself tracks the connection of the two ids in an extra table! A simple lookup of the correct fcId would suffice to fix the problem.
    via by AlRe,
  • I'm doing a test upgrade from 3.13.3. After importing all our existing data via the XML backup/restore tool I restarted Jira and it began doing an "upgrade to build number 466" automatically. During that process I get the following error repeating every couple percent during "converting search requests to JQL": {code} 2009-10-06 17:48:40,611 Thread-1 INFO [jira.upgrade.tasks.UpgradeTask_Build428] Converting search requests to JQL is 93% complete. 2009-10-06 17:48:40,626 Thread-1 WARN [jira.upgrade.tasks.UpgradeTask_Build428] Could not namify the query: 'null' com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:129) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:508) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:419) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:356) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:307) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:246) at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:186) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:30) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:28) at com.atlassian.util.concurrent.LazyReference$1.call(LazyReference.java:79) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:121) ... 22 more 2009-10-06 17:48:40,689 Thread-1 INFO [jira.upgrade.tasks.UpgradeTask_Build428] Converting search requests to JQL is 94% complete. {code}
    via by Chris Tashjian,
  • h2. Symptoms Filters affected are only those which: * Specify a clause using the "select custom field" * The value of the clause references an option which has the same name as an option that was previously deleted from a custom field context h3. NullPointerException appears in the logs during upgrade to 4.0 data which contains specific filters: {noformat} 2009-10-06 17:48:40,626 Thread-1 WARN [jira.upgrade.tasks.UpgradeTask_Build428] Could not namify the query: 'null' com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:129) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:508) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:419) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:356) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:307) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:246) at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:186) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:30) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:28) at com.atlassian.util.concurrent.LazyReference$1.call(LazyReference.java:79) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:121) ... 22 more {noformat} h3. NullPointerException appears in a stack trace when running specific JQL filters in the Issue Navigator Stack trace is similar to the above h2. Diagnosis If you're seeing these exceptions, have a look at the customer data and find out if there are any records in the {{customfieldoption}} table which reference non-existant {{fieldconfiguration}} records. Here is the SQL: {{select * from customfieldoption where customfieldconfig not in (select id from fieldconfiguration)}} If there are records returned, then any search which mentions the {{customvalue}} s as the right hand side of a select custom field clause will be affected. h2. Cause When deleting a custom field context for a select custom field, the options created are not deleted. They remain in the {{customfieldoption}} table, with references to a {{fieldconfiguration}} (custom field context) that no longer exists (because it was deleted). A JQL clause that references the option "NAME" will look up all stored custom field options with that name, and attempt to resolve each option to its related field, in order to calculate the context of the clause. This includes all "dead options". When the related custom field is looked up, the NullPointerException is thrown.
    via by Michael Tokar,
  • {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-184].{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}When copying a project, we got a NPE: {code} 2012-11-13 12:45:35,657 http-8100-2 ERROR alexander.vonrenteln 765x4466x1 vlvks8 10.17.60.137 /secure/admin/groovy/CannedScriptRunner.jspa [onresolve.jira.groovy.GroovyRunner] The script failed : java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:187) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManager$getFieldConfig.call(Unknown Source) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4_closure7_closure8.doCall(CopyProject.groovy:358) at sun.reflect.GeneratedMethodAccessor1212.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4_closure7.doCall(CopyProject.groovy:351) at sun.reflect.GeneratedMethodAccessor1211.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject$_doCopyProject_closure4.doCall(CopyProject.groovy:348) at sun.reflect.GeneratedMethodAccessor1209.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.canned.admin.CopyProject.doCopyProject(CopyProject.groovy:347) at com.onresolve.jira.groovy.canned.admin.CopyProject$doCopyProject.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at com.onresolve.jira.groovy.canned.admin.CopyProject.doScript(CopyProject.groovy:219) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:57) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:47) at com.onresolve.jira.groovy.GroovyRunner$run.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145) at com.onresolve.jira.groovy.CannedScriptRunner.doExecute(CannedScriptRunner.groovy:233) at com.onresolve.jira.groovy.GroovyRunner.execute(GroovyRunner.java:341) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:221) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:150) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:104) at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at com.atlassian.jira.web.filters.SitemeshPageFilter.doFilter(SitemeshPageFilter.java:124) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:234) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:157) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463) at com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) {code} After some debugging, we realized that the scriptrunner build-in script "copy project" expects the entries in the tables fieldconfiguration and fieldconfigscheme to be in sync and have the same ids. This is the case most of the time but in our instance this assumption is wrong. Hence, this plugin creates wrong connections in the table fieldconfigschemeissuetype which will then break JIRA (wrong casts etc.) Here is an excerpt of the groovy code: {code} // Set PROJECT CATEGORY projectManager.setProjectCategory (newprojectGV, projectManager.getProjectCategoryFromProject(srcProjectGV)) // SET CUSTOM FIELDS customFieldManager.getCustomFieldObjects().each {CustomField cf -> fieldConfigSchemeManager.getConfigSchemesForField(cf).each {FieldConfigScheme fcs -> if (!fcs.isGlobal()) { fcs.getAssociatedProjects().each {GenericValue project -> if (project.getLong("id") == srcProject.getId()) { log.debug (fcs.name + " associated with " + project.name + ", need to modify this") Long fcsId = fcs.id FieldConfigScheme cfConfigScheme = fieldConfigSchemeManager.getFieldConfigScheme(fcsId) FieldConfigScheme.Builder cfSchemeBuilder = new FieldConfigScheme.Builder(cfConfigScheme) FieldConfig config = fieldConfigManager.getFieldConfig(fcsId) {code} The last line will cause a NPE if the fcsId and the fcId are not in sync. This cannot be assumed because JIRA itself tracks the connection of the two ids in an extra table! A simple lookup of the correct fcId would suffice to fix the problem.
    via by AlRe,
  • h2. Symptoms Filters affected are only those which: * Specify a clause using the "select custom field" * The value of the clause references an option which has the same name as an option that was previously deleted from a custom field context h3. NullPointerException appears in the logs during upgrade to 4.0 data which contains specific filters: {noformat} 2009-10-06 17:48:40,626 Thread-1 WARN [jira.upgrade.tasks.UpgradeTask_Build428] Could not namify the query: 'null' com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:129) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:508) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:419) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:356) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:307) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:246) at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:186) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:30) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:28) at com.atlassian.util.concurrent.LazyReference$1.call(LazyReference.java:79) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:121) ... 22 more {noformat} h3. NullPointerException appears in a stack trace when running specific JQL filters in the Issue Navigator Stack trace is similar to the above h2. Diagnosis If you're seeing these exceptions, have a look at the customer data and find out if there are any records in the {{customfieldoption}} table which reference non-existant {{fieldconfiguration}} records. Here is the SQL: {{select * from customfieldoption where customfieldconfig not in (select id from fieldconfiguration)}} If there are records returned, then any search which mentions the {{customvalue}} s as the right hand side of a select custom field clause will be affected. h2. Cause When deleting a custom field context for a select custom field, the options created are not deleted. They remain in the {{customfieldoption}} table, with references to a {{fieldconfiguration}} (custom field context) that no longer exists (because it was deleted). A JQL clause that references the option "NAME" will look up all stored custom field options with that name, and attempt to resolve each option to its related field, in order to calculate the context of the clause. This includes all "dead options". When the related custom field is looked up, the NullPointerException is thrown.
    via by Michael Tokar,
  • I'm doing a test upgrade from 3.13.3. After importing all our existing data via the XML backup/restore tool I restarted Jira and it began doing an "upgrade to build number 466" automatically. During that process I get the following error repeating every couple percent during "converting search requests to JQL": {code} 2009-10-06 17:48:40,611 Thread-1 INFO [jira.upgrade.tasks.UpgradeTask_Build428] Converting search requests to JQL is 93% complete. 2009-10-06 17:48:40,626 Thread-1 WARN [jira.upgrade.tasks.UpgradeTask_Build428] Could not namify the query: 'null' com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:129) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:508) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:419) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:356) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:307) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:246) at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100) at com.atlassian.jira.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:186) at com.atlassian.jira.issue.fields.config.manager.FieldConfigManagerImpl.getFieldConfig(FieldConfigManagerImpl.java:33) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:30) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption$1.create(LazyLoadedOption.java:28) at com.atlassian.util.concurrent.LazyReference$1.call(LazyReference.java:79) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115) at com.atlassian.jira.issue.customfields.option.LazyLoadedOption.getRelatedCustomField(LazyLoadedOption.java:61) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getFieldFromOption(JqlSelectOptionsUtil.java:234) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptionFromString(JqlSelectOptionsUtil.java:207) at com.atlassian.jira.jql.util.JqlSelectOptionsUtil.getOptions(JqlSelectOptionsUtil.java:134) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getContextOptions(SelectCustomFieldClauseContextFactory.java:109) at com.atlassian.jira.jql.context.SelectCustomFieldClauseContextFactory.getClauseContext(SelectCustomFieldClauseContextFactory.java:68) at com.atlassian.jira.jql.context.MultiClauseDecoratorContextFactory.getClauseContext(MultiClauseDecoratorContextFactory.java:66) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:134) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.TerminalClauseImpl.accept(TerminalClauseImpl.java:137) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:80) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.jql.context.QueryContextVisitor.createContext(QueryContextVisitor.java:55) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:73) at com.atlassian.jira.jql.context.QueryContextVisitor.visit(QueryContextVisitor.java:36) at com.atlassian.query.clause.AndClause.accept(AndClause.java:34) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSimpleQueryContext(DefaultSearchService.java:221) at com.atlassian.jira.bc.issue.search.DefaultSearchService.getSearchContext(DefaultSearchService.java:123) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getNamifiedQuery(UpgradeTask_Build428.java:200) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.getQueryFromXml(UpgradeTask_Build428.java:312) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.upgradeSearchRequests(UpgradeTask_Build428.java:149) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build428.doUpgrade(UpgradeTask_Build428.java:121) ... 22 more 2009-10-06 17:48:40,689 Thread-1 INFO [jira.upgrade.tasks.UpgradeTask_Build428] Converting search requests to JQL is 94% complete. {code}
    via by Chris Tashjian,
    • java.lang.NullPointerException at com.atlassian.jira.issue.fields.config.persistence.FieldConfigPersisterImpl.getFieldConfig(FieldConfigPersisterImpl.java:118) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.transformToDomainObject(FieldConfigSchemePersisterImpl.java:248) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getFieldConfigScheme(FieldConfigSchemePersisterImpl.java:176) at com.atlassian.jira.issue.fields.config.persistence.CachedFieldConfigSchemePersister.getFieldConfigScheme(CachedFieldConfigSchemePersister.java:54) at com.atlassian.jira.issue.fields.config.persistence.FieldConfigSchemePersisterImpl.getInvalidFieldConfigSchemeAfterIssueTypeRemoval(FieldConfigSchemePersisterImpl.java:113) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.getInvalidFieldConfigSchemesForIssueTypeRemoval(FieldConfigSchemeManagerImpl.java:289) at com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl.removeInvalidFieldConfigSchemesForIssueType(FieldConfigSchemeManagerImpl.java:273) at com.atlassian.jira.web.action.admin.issuetypes.DeleteIssueType.doExecute(DeleteIssueType.java:181)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,