Tuesday, April 19, 2016

How to Handle invalid record during baseline CAS record store update from ATG?

The /atg/endeca/index/commerce/ProductCatalogSimpleIndexingAdmin component triggers baseline indexing. As part of baseline process, ATG pus... thumbnail 1 summary
The /atg/endeca/index/commerce/ProductCatalogSimpleIndexingAdmin component triggers baseline indexing. As part of baseline process, ATG pushes product data to Endeca record store.

Behaviour :-

Following error comes sometimes during baseline indexing process


com.endeca.itl.recordstore.impl.RecordStoreImpl: Error executing method RecordStoreImpl.writeRecords()
java.lang.NullPointerException
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.handleInvalidRecord(RecordStoreImpl.java:282)
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.validateRecords(RecordStoreImpl.java:274)
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.writeRecords(RecordStoreImpl.java:242)
    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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
2016-02-05 16:35:10,432 WARN [] [@endeca] org.apache.cxf.phase.PhaseInterceptorChain: Application {http://recordstore.itl.endeca.com/}RecordStoreService#{http://recordstore.itl.endeca.com/}writeRecords has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
    at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178)
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
Caused by: java.lang.NullPointerException
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.handleInvalidRecord(RecordStoreImpl.java:282)
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.validateRecords(RecordStoreImpl.java:274)
    at com.endeca.itl.recordstore.impl.RecordStoreImpl.writeRecords(RecordStoreImpl.java:242)
    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.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
    at com.endeca.itl.service.ServicePublisher$2.performInvocation(ServicePublisher.java:106)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
    ... 44 more 



Solution:-

Invalid records are records with missing IDs (either the idPropertyName property is missing or it has a null value) or with invalid action types for the Endeca.Action property.

Find out possible solutions below :-
  1. Pass all required properties to product data but indexing process will continue to fail until all product records get corrected
  2. Change the Record store configuration file and add "ignoreInvalidRecords" to record store configuration. Find out steps below to update record store
    1. Run command to get current record store configuration /data/endeca/CAS/11.2.0/bin->./recordstore-cmd.sh get-configuration -a Discover-data -f dataConfig.xml
    2. Add  <ignoreInvalidRecords>true</ignoreInvalidRecords> into record store configuration and save.
    3.  Run ./recordstore-cmd.sh set-configuration -a Discover-data -f dataConfig.xml to update configuration
  3. Sample Configutation file as attached
    Endeca CAS Reacord Store Ignore Invalid Record properties

From Author
Was this post help you to resolve the issue that you are looking for? Any other issues that you might have and need a solution?

Click here for more ATG-Endeca Integration related issue.


No comments

Post a Comment

Text Widget