Showing posts with label Endeca Errors. Show all posts
Showing posts with label Endeca Errors. Show all posts

Monday 7 August 2017

Exception Handling in Endeca

Hi All,
  I am Going to Share Some Basics note about Exception Handling in Endeca . We will be having Many Scenarios that has to be handled, so that the Users will not lead to seeing the Error or the Exceptions. I am sharing my Experience it varies from the Implementation Perspective from developers to developers .

When we are implementing the Assembler Approach there are only two types of Exceptions will be land in to and we have to handle everything within it.

Exception
Description
AssemblerException
This Exception states that the exception occurred during the process or creating the Assembler Request. Eg ene Query,Host Exception
CartridgeHandlerException
This Exception Occurs while calling the single Cartridge handler, usually exceptions like NPE,Range Exceptions .

Well, we have Seen These Two Exceptions and next step is to how to bring these Exceptions in to our applications. When the endeca contentItems are rendered from the JSP then it is with the Developer, who renders it and no need to worry about this status. Where else we are going with the Rest or the JAX-RS Approach which requires these Scenarios to be handled before Sending the Status to the Service.

When you see the Architecture, there is no way we can handled the Exception Thrown. So what we have to do? Customize the Invoke Assembler or Assembler Tools only for the Exceptions? Not required.

So here is what you have to do, When the Assembler Exception Happens or the Cartridge Handler Exceptions Happens you are able to see the @error Param on the Content Item, when you go in to this param , you could able to see the type of exception. You can write a wrapper on top of the Calling type method for example in the Actor Chains, if it is going to be the Rest MVC architecture and Nucleus Resource Class in case of the JAX-RS Implementation, take the ContentItem that InvokeAssmbler Returns send it the Method and Parse it, weather it is network, Invalid key, NPE, Range, MDEX Down, Class Cast Exception and handle it appropriately based on the Type of Exception Status and Error Codes.. If the Content Item is null then blindly throw it as 500 Status .

I have handled in the above way Instead of throwing the Generic Exceptions, and it is working as Excepted. Hope you have understood the Easiest Way of handling the types of Exceptions in Endeca.

If you have any other Reference of handling it can Suggest Below.

Happy Learning !!!!!


Wednesday 12 July 2017

[MDEX] Failed to parse URL

Hi All,
       Most of us Face the issue relating to the MDEX very often. The Best way to Debug and Solve is to take the Url and paste it to the Browser and give the format=xml or json, once if you give like above you can able to identify which is the Missing Property . Usually this happens if the non index property is added as part of the Query and indulged in the operations like sorting or Filtering .

But Some Scenarios you have no clue of Identifying which property went wrong . It will take time to identify this.

Error:[MDEX] Failed to parse URL: '/graph?node=0&select=promoId&merchrulefilter=endeca.internal.nonexistent&groupby=promoId&offset=0&nbins=10&allbins=1&attrs=All|oil|mode+matchallpartial&autophrase=1&autophrasedwim=1&log=reqcom=NavigationRequest&sid=HCGcWoz2-aE_ncnZIJD0G89_UmEHFCiG10-NHa1we6pp9s8773_l%21-695473435%211497272464980&rid=270&irversion=652'

It will not give the exact property Where it gets failed . In the above url promoId Went wrong. When i check the Url it was not clear and check later promoID is the Rollup and none of the Rollup is set as part of the indexing . I fixed this by Setting the Index Config back again and triggering indexing.

Sunday 9 July 2017

Config Repository Error

Hi All,
   Today , I was facing some Strange Error in Production, Which is causing the Indexing not to be succeed and it is failing . We analysed the issue.

Caused by: com.endeca.soleng.eac.toolkit.exception.CasCommunicationException: Error Starting baseline crawl 'ATGen-last-mile-crawl'.Unable to login to config repository site for user "admin", status code: 401, Response:

ROOT CAUSE:
It seems to be config repository password got changed and it is unable to login in to it, during Indexing .


IDENTIFICATION:

We tried Many approaches Starting From Creating the Config Password and Changing it in the Credential Store Manager , which seems to be the Wrong Solution.

SOLUTION:
After Struggling for the hours together , we came in to the Solution of Deleting the Config Repository and Recreating it . Which is the Correct Solution and Worked also.

WARNING:
When you are deleting the Config Repository, we should be Aware that we are not Performing it , When the Site is Live or Busy, because Recreating the Crawl will change the Dimensions Id, Which will not have any impact if it was having Dimensions id Imported.If not all the Dimensions will change you will be having the Tough Time .  

This Issue was identified Often in Endeca 11.2 , not sure why it is exactly happening can fix this as of now with the above Solution . Happy Tricking !!!





Saturday 6 May 2017

Input Record Does not have a valid Id

Hi All, Today I was Facing some weird Exception , I didn’t understand at the First then I started understanding that the Exception was due to the Deployment Template, below is the trace of the Exception.

ERROR /atg/search/repository/BulkLoader -
atg.repository.search.indexing.IndexingException: Error sending record atg.endeca.index.record.Record@c28a71bd

Root cause: Input record does not have a valid Id. at atg.endeca.index.RecordStoreDocumentSubmitterSessionImpl.submitRecord(RecordStoreDocumentSubmitterSessionImpl.java:436) at atg.endeca.index.RecordSubmitterSessionImpl.submitDocument(RecordSubmitterSessionImpl.java:240) at atg.endeca.index.AbstractRecordStoreAggregateSession.submitDocument(AbstractRecordStoreAggregateSession.java:357) at atg.repository.search.indexing.LoaderImpl.outputAndSubmitDocument(LoaderImpl.java:1167)


This Happened Because, I was using the CRS Deployment Template to create the app, as part of the Migration, and we have created the app using the Discover Deployment Template. Discover uses common.id and CRS uses the record.id as the common identifier for the record.

Solution is to Change the app back to the CRS this issue will be resolved. 

Monday 5 December 2016

Endeca Errors

1) @error:com.endeca.infront.navigation.NavigationException: com.endeca.navigation.ENEConnectionException: Connection unable to determine response code from navigation engine


ROOT CAUSE:
When you encounter the above error, check for the ENEQuery Being sent to Endeca. It Must be overloaded with the FieldNames or sorters or any other fields. 

IDENTIFICATION:
Check for the Dgraph Logs for the Query being sent to Endeca.

SOLUTION:
 Follow the Best Practises in setting up the Query, always initialize and set in query.

2) @error=com.endeca.infront.content.ContentException: com.endeca.navigation.ENEConnectionException: HttpENEConnection looking for binary port of Navigation Engine, but found XML port instead. Reconfigure connection to port-2 for binary Navigation Engine port. Check MDEX Logs and specified query parameters


ROOT CAUSE:
When you Encounter above error it means , you are getting the Exception from the LoadBalancer VIP that was configured. When the Mdex is down for few seconds because of the Indexing is in Progess, during that time you will face this issue.

IDENTIFICATION:
Configure the VIP in Assembler Application Configuration and make the Dgraph Down from EAC admin console and hit the Application.

SOLUTION:
 WorkAround should be in the Load Balancer side . 

3) SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. Releasing locks.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.endeca.soleng.eac.toolkit.Controller.invokeRequestedMethod(Controller.java:931)
        at com.endeca.soleng.eac.toolkit.Controller.execute(Controller.java:269)
        at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:137)
Caused by: com.endeca.soleng.eac.toolkit.exception.AppControlException: Error executing valid BeanShell script.
        at com.endeca.soleng.eac.toolkit.script.Script.runBeanShellScript(Script.java:179)
        at com.endeca.soleng.eac.toolkit.script.Script.run(Script.java:127)
        ... 7 more
Caused by: com.endeca.soleng.eac.toolkit.exception.CasCommunicationException:
 Error starting baseline crawl 'stg1-last-mile-crawl'.
        at com.endeca.eac.toolkit.component.cas.ContentAcquisitionServerComponent.startBaselineCasCrawl
(ContentAcquisitionServer
Component.java:400)
        at com.endeca.eac.toolkit.component.cas.ContentAcquisitionServerComponent.runBaselineCasCrawl
(ContentAcquisitionServerComponent.java:308)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at bsh.Reflect.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHBlock.evalBlock(Unknown Source)
        at bsh.BSHBlock.eval(Unknown Source)
        at bsh.BSHBlock.eval(Unknown Source)
        at bsh.BSHIfStatement.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at com.endeca.soleng.eac.toolkit.script.Script.runBeanShellScript(Script.java:165)
        ... 8 more
Caused by: Crawl failed to start: Error retrieving attributes from the config repository: 
Unable to create JSON output for merge request: validation errors:
  ERROR: failure to add '/sites/CRs/attributes/content.repositoryId' to merged output: wrong value for property 'mergeAction' (UPDATE) when no imported entry found to merge with.
  ERROR: failure to add '/sites/CRS/attributes/product.repositoryId' to merged output: wrong value for property 'mergeAction' (UPDATE) when no imported entry found to merge with.
  ERROR: failure to add '/sites/CRS/attributes/store.repositoryId' to merged output: wrong value for property 'mergeAction' (UPDATE) when no imported entry found to merge with.
  ERROR: failure to add '/sites/CRS/attributes/article.repositoryId' to merged output: wrong value for property 'mergeAction' (UPDATE) when no imported entry found to merge with.
  ERROR: failure to add '/sites/CRS/attributes/sku.margin' to merged output: wrong value for property 'mergeAction' (UPDATE) when no imported entry found to merge with.
. See config repository log for more details.

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

ROOT CAUSE:
When you encounter the above error,every time when indexing is running in place , it will look for the properties or dimensions defined here if it is not available then it will throw the merge error. 

IDENTIFICATION:

Delete the particular property from the DB , so not a single value is found then this error will occur.


SOLUTION:

 Remove the Value from the indexconfig and set the indexing config again, then you are set 
For more information on setting the config see my earlier posts .