168 views

Description

During a reindexing process on a table where records fail to be found by global search, a null pointer exception may be thrown by the CurrencyPriceOptimizer when calling GlideRecord.next():

java.lang.NullPointerException
at com.glide.currency.CurrencyPriceOptimizer.setValues(CurrencyPriceOptimizer.java:199)
at com.glide.script.AGlideRecordOptimizer.next(AGlideRecordOptimizer.java:49)
at com.glide.script.GlideRecord.applyOptimizers(GlideRecord.java:3260)
at com.glide.script.GlideRecord.next(GlideRecord.java:6121)
at com.glide.ts.indexer.TSIndexThread.processSet(TSIndexThread.java:138)
at com.glide.ts.indexer.TSIndexThread.index(TSIndexThread.java:105)
at com.glide.ts.indexer.TSIndexThread.run0(TSIndexThread.java:81)
at com.glide.util.ParentedThread.run(ParentedThread.java:51)

Steps to Reproduce

The exact steps to reproduce are not available. This issue was found after starting a 'Regenerate Text Index' job, that failed several times due to the null pointer exception. The reindexing was required by a global text search run on task numbers not returning the expected task records.

If the task number values fail to get indexed, then the exact match search will not find them when using the latest global search engine. However, the legacy global search will still find a record that is not indexed.

This could be significant if you had a backlog of text index events. You would still want the exact match to find the record while we wait for the record to get indexed, and since the purpose of exact match is to avoid a text search, it should not matter if the record is not yet indexed.

 

Workaround

This problem was fixed since Jakarta Patch 9. As a workaround on older versions, you can disable the code path that generates the NullPointerException by disabling the optimizer setting the system property as follows: 

glide.currency_price_optimizer.enabled = false 

This might affect performance when the related table has a currency field, however it will avoid the NullPointerException. 

After that, reindexing the table that has generated the issue will be necessary. If possible, you can disable text_index on one of the columns to reduce memory usage.

 


Related Problem: PRB1248691

Seen In

Istanbul
Jakarta

Fixed In

Jakarta Patch 9
Kingston Patch 3
London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-05-22 16:24:33
Published:2018-02-27