Showing posts with label ATG-Endeca integration Issues. Show all posts
Showing posts with label ATG-Endeca integration Issues. Show all posts

Endeca integration API libraries in ATG DAF module - ATG Endeca Integration

ATG 10.1.1 include the following Endeca libraries.
/ATG10.1.1/DAF/Endeca/Assembler/lib/endeca_assembler-3.1.0.jar
/ATG10.1.1/DAF/Endeca/Assembler/lib/endeca_navigation-6.3.0.jar
/ATG10.1.1/DAF/Endeca/Index/lib/custom


ATG 10.1.2 includes
/ATG10.1.2/DAF/Endeca/Assembler/lib/endeca_assembler-3.1.1.jar
/ATG10.1.2/DAF/Endeca/Assembler/lib/endeca_navigation-6.4.0.jar
/ATG10.1.2/DAF/Endeca/Index/lib/custom
/ATG/ATG10.1.2/DAF/Endeca/Index/lib/custom311


ATG 10.2 includes 
/ATG10.2/DAF/Endeca/Assembler/lib/endeca_assembler-3.1.2.jar
/ATG10.2/DAF/Endeca/Assembler/lib/endeca_navigation-6.4.1.jar
/ATG10.2/DAF/Endeca/Index/lib/custom311

Avoiding CXF log entries in JBOSS log file during Endeca indexing - Endeca Indexing Issues

Need help to get clean JBOSS log during indexing and here is the change request:
Add the following to jboss-as\server\server-name\conf\jboss-log4j.xml: 

<category name="org.apache.cxf.interceptor.LoggingInInterceptor">
<priority value="WARN"/>
</category>
<category name="org.apache.cxf.interceptor.LoggingOutInterceptor"><priority value="WARN"/>
</category>


How to define Dimension & Property in Endeca for forgeless approach? - Oracle commerce 11.x

There are two ways to define dimension and properties for Forge-less approach:

1) Define at Product-sku-output-config(PSOC) level
Ex:
      DIMENSION:  <property name="pattern" type="string" output-name="Pattern" multiselect-type="multi-or"  is-dimension="true"  />

      PROPERTY:   <property name="description" type="string" output-name="P_Description" text-searchable="true"/>

2) Define at Index config Level
File location: /opt/app/endeca/apps/APPNAME/config/index_config/index-config.json


a) Add dimension and property as below mentioned in example and you can define searchable, filter, roll-up, dimension, multi select etc...
Ex:
{
  "indexConfig" : {
    "attributes" : {
      "jcr:primaryType" : "endeca:unstructured",
      "record.id" : {
        "propertyDataType" : "ALPHA",
        "jcr:primaryType" : "endeca:property",
        "isRecordFilterable" : true
                },
                "sku.margin" : {
          "propertyDataType" : "DOUBLE",
          "jcr:primaryType" : "endeca:property"
        },
                "product.repositoryId" : {
          "propertyDataType" : "ALPHA",
          "mergeAction" : "UPDATE",
          "isRollupKey" : true,
          "jcr:primaryType" : "endeca:property",
          "isRecordFilterable" : true

        },
                "product.price_range" : {
                  "rangeComparisonType" : "FLOAT",
                  "multiSelectType" : "OR",
                  "sourcePropertyNames" : ["sku.sortPrice"],
                  "jcr:primaryType" : "endeca:dimension"
                }

        },
    "precedenceRules" : {
    },
    "searchIndexConfig" : {
      "isWildcardEnabledInDimensionSearch" : true,
      "spellingDictMaxWordLength" : 16,
      "spellingDictMinNumWordOccurrences" : 4,
      "spellingDictMinWordLength" : 3
    }
  }
}

b) Once you update index-config.json make sure to set configurations at Endeca repository level.

    Here is the command:
   /opt/app/endeca/apps/APPNAME/control :>

                          ./index_config_cmd.sh set-config -f ../config/index_config/index-config.json -o all

c) Run Endeca indexing to see your dimension(s) and propertie(s) added

Endeca InvokeAssembler:Assembler Exception:---java.lang.NullPointerException and also Jboss log file fills in GB with StackOverflowError message

Problem Statement:

Endeca InvokeAssembler:Assembler Exception:---java.lang.NullPointerException is thrown and also Jboss Log is filling in GB in few minutes to Hour with below exception:

2015-07-09 03:46:06,987 ERROR [nucleusNamespace.atg.endeca.InvokeAssembler] (ajp-0.0.0.0-10109-20) InvokeAssembler.service():Assembler Excepti on:---java.lang.NullPointerException 2015-07-09 2015-07-09 03:46:07,664 FATAL [org.apache.jasper.runtime.JspFactoryImpl] (ajp-0.0.0.0-10109-24) Exception initializing page context java.lang.StackOverflowError

       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
       at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
       at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)

Solution:
If there is no default page defined you will get above exceptions.

Assembler checks for trigger condition(s), priority, segmentation, time-boxing etc..  Make sure default page does not have expired time box or segmentation.

For example : Home page will be created for each day with time boxed. Merchandiser will create home page versions for 1 week with time boxing. If there is no valid page with expired time-box then assembler never finds default Home page and throws errors in JBOSS log.

How to check time boxing on page:

Go to Endeca XM page and check for below highlighted spot.






How to Remove time box? 

Uncheck the time and make one of the page default.


FYI
XM Promote page script run is required to reflect any changes done on site.

How to schedule Endeca index using ATG ProductCatalogSimpleIndexingAdmin component? - Endeca Indexing Job

Component path: /atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin 
# enableScheduledIndexing: defaults to false. Must be true for the above schedules to have any effect 
enableScheduledIndexing=true 
# baselineSchedule - Run a baseline every 2 Hrs 
baselineSchedule=calendar * * * * 0,2,4,6,8,10,12,14,16,18,20,22 00

How to test Endeca response content returned on the browser? - Endeca

There are two formats to render Endeca response content and that is XML or JSON.

Here is the URL structure:

For XML response content use parameter format=xml and for JSON content use format=json

http://HOST:PORT/browse/sweaters/women/_/N-27bh?format=xml

http://HOST:PORT/browse/sweaters/women/_/N-27bh?format=json

Endeca concurrent write exception - atg.repository.search.indexing.IndexingException: com.endeca.itl.recordstore.ConcurrentWriteException???

Problem:You will see below exception in Jboss log
ERROR [ProductCatalogSimpleIndexingAdmin]
atg.repository.search.indexing.IndexingException: com.endeca.itl.recordstore.ConcurrentWriteException: Write in progress with generation 40
at atg.endeca.index.RecordStoreDocumentSubmitterSessionImpl.beginSession(RecordStoreDocumentSubmitterSessionImpl.java:225)
at atg.endeca.index.AbstractRecordStoreAggregateSession.getSessionForKey(AbstractRecordStoreAggregateSession.java:300)
at atg.endeca.index.AbstractRecordStoreAggregateSession.getSessionForContext(AbstractRecordStoreAggregateSession.java:249)
at atg.endeca.index.AbstractRecordStoreAggregateSession.getSessionForCurrentContext(AbstractRecordStoreAggregateSession.java:238)
at atg.endeca.index.AbstractRecordStoreAggregateSession.submitRecord(AbstractRecordStoreAggregateSession.java:334)
at atg.endeca.index.LocaledExporter.exportRecords(LocaledExporter.java:295)
at atg.endeca.index.LocaledExporter.export(LocaledExporter.java:258)
at atg.endeca.index.LocaledExporter.export(LocaledExporter.java:208)
at atg.endeca.index.LocaledExporter.performBaselineUpdate(LocaledExporter.java:345)
at atg.endeca.index.admin.IndexingTask.doTask(IndexingTask.java:401)
at atg.endeca.index.admin.IndexingTask.performTask(IndexingTask.java:359)
at atg.endeca.index.admin.IndexingPhase.performPhaseTasks(IndexingPhase.java:265)
at atg.endeca.index.admin.IndexingPhase.performPhaseTasksSerially(IndexingPhase.java:242)
at atg.endeca.index.admin.IndexingJob.performJobSerially(IndexingJob.java:264)
at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:657)
at atg.endeca.index.admin.SimpleIndexingAdmin.indexBaseline(SimpleIndexingAdmin.java:636)
at atg.endeca.index.admin.SimpleIndexingAdmin$2.run(SimpleIndexingAdmin.java:1008)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.endeca.itl.recordstore.ConcurrentWriteException: Write in progress with generation 40 at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141) at $Proxy154.startTransaction(Unknown Source) at atg.endeca.index.RecordStoreDocumentSubmitterSessionImpl.beginSession(RecordStoreDocumentSubmitterSessionImpl.java:217)

Solution:
If you stop Endeca indexing from ATG(/atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin/) before it completes then it will acquire lock and then subsequent baseline updates will fail with above exception.

Solution#1: Restarting Endeca CAS which will remove the lock acquired - Temporary fix

Solution #2:  Make sure you restart CAS after every baseline update to avoid this issue plus some other issues related to CAS

Add /control/initialize_RS_services.sh script at the end of  /control/baseline_update.sh script - It will delete all the records stores and create new one each time and also helps to improve some level of performance on CAS side

Solution #3: Set resetActive flag to true on following components to rollback any previously active transactions
/dyn/admin/nucleus/atg/endeca/index/DataDocumentSubmitter/?propertyName=resetActive

/dyn/admin/nucleus/atg/endeca/index/DimensionDocumentSubmitter/?propertyName=resetActive
/dyn/admin/nucleus/atg/endeca/index/SchemaDocumentSubmitter /?propertyName=resetActive

How to read data from Endeca CAS record store instance, Run ATG CMS and Endeca baseline update through Dynamo admin? - ATG Endeca Integration Issues

If you are not sure whether the ATG records are pushed at Endeca CAS level or not, then read the record store from the CAS by running below script.

/opt/app/endeca/CAS/version/bin>./recordstore-cmd.sh read-baseline -a <appname_en_data> -f <new-file-path>.xml

Ex. - /opt/app/endeca/CAS/version/bin>./recordstore-cmd.sh read-baseline -a APPNAME_en_data -f ../../APPNAME_en_data.xml

It will help to cross verify if any record is not showing in Endeca but merchandized in BCC and deployed. Sometime CMS(Catalog Maintenance Service) fails and does not pass latest records to Endeca. Try manually running CMS and Endeca Indexing.

Running ATG CMS(Catalog Maintenance Service):

http://localhost:port/dyn/admin/atg/commerce/admin/en/maintenance/startService.jhtml?process=BasicMaintProcess

Running Endeca Baseline update:
http://localhost:port/dyn/admin/nucleus//atg/commerce/endeca/index/ProductCatalogSimpleIndexingAdmin/