Notifications

601 views

Description

In a list query with group by, the NullPointerException error below comes from attempting to populate the "# total records" to the top right of the list. The aggregate is generated differently and needs to be handled in Text Search code. At the same time, invalid user preferences sys_user_group.db.order=zztextsearchyy are generated.

Example stack trace:
2014-07-01 16:30:56 (982) Default-thread-4 BB2941139F2121008415308DC67FCF11 *** ERROR *** java.lang.NullPointerException
2014-07-01 16:30:56 (982) Default-thread-4 BB2941139F2121008415308DC67FCF11 SEVERE *** ERROR *** java.lang.NullPointerException
java.lang.NullPointerException
at com.glide.ts.query.TSRelevancySortStrategy.buildPopper(TSRelevancySortStrategy.java:45)
at com.glide.ts.query.TSAbstractSortStrategy.addReturnFields(TSAbstractSortStrategy.java:105)
at com.glide.ts.query.TSRelevancySortStrategy.addReturnFields(TSRelevancySortStrategy.java:59)
at com.glide.ts.service.TSQueryContext.addReturnFields(TSQueryContext.java:23)
at com.glide.db.DBAggregateQuery.toSQL(DBAggregateQuery.java:97)
at com.glide.db.DBQuery.getSelectStmt(DBQuery.java:596)
at com.glide.db.DBQuery.executeAsResultSet0(DBQuery.java:235)
at com.glide.db.DBQuery.executeAsResultSet(DBQuery.java:208)
at com.glide.db.access.DBTable.query(DBTable.java:91)
at com.glide.db.DBAggregateUtil.count(DBAggregateUtil.java:179)
at com.glide.script.GlideAggregate.getTotalRecordCount(GlideAggregate.java:724)
at com.glide.script.GlideAggregate.getTotalFromAggregates(GlideAggregate.java:568)
at com.glide.list_v2.ListRecordGroupedTag.setRowCounts(ListRecordGroupedTag.java:129)
at com.glide.list_v2.ListRecordDefaultTag.doTag(ListRecordDefaultTag.java:77)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:291)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:111)
at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:94)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:146)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:232)
at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:84)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:291)
at com.glide.ui.jelly.GlideJellyContext.run(GlideJellyContext.java:727)
at com.glide.ui.jelly.GlideJellyContext.executeCompiledScript(GlideJellyContext.java:792)
at com.glide.ui.GlideFormPhase2.generate(GlideFormPhase2.java:49)
at com.glide.ui.GlideForm.generatePopulatedForm(GlideForm.java:610)
at com.glide.ui.GlideForm.quickExit(GlideForm.java:247)
at com.glide.ui.GlideForm.getRenderedPage(GlideForm.java:161)
at com.glide.ui.NavigationTransaction.writeOutput(NavigationTransaction.java:154)
at com.glide.ui.NavigationTransaction.process(NavigationTransaction.java:123)
at com.glide.ui.GlideServletUITransaction.process(GlideServletUITransaction.java:89)
at com.glide.processors.Processor.runProcessor(Processor.java:370)
at com.glide.processors.Processor.processTransaction(Processor.java:160)
at com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:146)
at com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:36)
at com.glide.ui.GlideServlet$1.run(GlideServlet.java:412)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)

Steps to Reproduce

 

  1. Navigate to Incident > All.
  2. Add a Keywords filter.
  3. Click the menu icon  and select Group By > Category.
    Note the stack trace in the log.

Workaround

After carefully considering the severity and frequency of the issue, and risk of attempting a fix, ServiceNow has decided to not address this issue in a future release. We do not make this decision lightly and we apologize for any inconvenience. If you have any questions regarding this problem contact ServiceNow Customer Support.

Despite the error being present, the behavior works as expected. The invalid generated user preferences sys_user_group.db.order=zztextsearchyy can be removed with no consequences.


Related Problem: PRB603400

Seen In

Dublin Patch 1
Dublin Patch 7 Hot Fix 2
Eureka Patch 10
Eureka Patch 11 Hot Fix 2
Eureka Patch 4 Hot Fix 1
Eureka Patch 6
Eureka Patch 7
Eureka Patch 9 Hot Fix 4
Fuji Patch 11
Fuji Patch 2 Hot Fix 1
Fuji Patch 3
Fuji Patch 8
Fuji Patch 9 Hot Fix 1
Geneva Patch 1 Hot Fix 6
Geneva Patch 7

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-10-03 05:00:10
Published:2016-08-05