Monday, July 3, 2023

Unable to retrieve the dimension information in Endeca XM

 Unable to retrieve the dimension information in Endeca XM error


Support documents mentions to install endeca patch by uninstalling ToolsAndFrameworks and reinstall with the patch. However, i tried by increasing the memory size of the Apache server 


Here is the  configuration change i made in 

PATH # <ENDECA INSTALL DIR>/ToolsAndFrameworks/11.3.2.0/server/bin

file # workbench.sh




Promoting Content in Endeca

 Steps for Promoting content in Endeca


1. After deploying the endeca project in XM.

2. Goto EAC Admin Console and click on Scripts, then click on PromoteAuthoringTolive start button.



3. After the content is published, status updates from 'Running' to 'Not Running'

4. You can also verify the content published by endeca via dyn/admin component mentioned file path.

http://<HOST>:<PORT>/dyn/admin/nucleus//atg/endeca/assembler/cartridge/manager/DefaultFileStoreFactory/


check the configurationPath property.

5. Login to linux machine or windows machine and check the path mentioned in the configurationPath whether zip file is current timestamp is present or not. Also, make sure store instance has permission to read files under shared folder

Sunday, July 2, 2023

Deleting Oracle Commerce (ATG) BCC Project

Here are the steps for deleting a BCC project from oracle DB

1. Remove avm assets locks for the project (if any)

delete from avm_asset_lock where workspace_id in

(select id from avm_devline where name in

(select workspace from epub_project where project_id = '<PROJECT  ID>'));


2.  Deleting history of this project

delete from EPUB_PR_HISTORY where project_id in

(select project_id from epub_project where project_id = '<PROJECT  ID>');


3. Delete the project

delete from epub_project where project_id = '<PROJECT  ID>';


4. Delete history of the process

delete from EPUB_PROC_HISTORY where process_id in

(select process_id from epub_process where project = '<PROJECT  ID>');


5. Delete task information of process

delete from EPUB_PROC_TASKINFO where id in

(select process_id from epub_process where project = '<PROJECT  ID>');


6. delete EPUB_WORKFLOW_STRS of project (if any)

delete  from EPUB_WORKFLOW_STRS where id in

(select id from EPUB_IND_WORKFLOW where process_id in

(select process_id from epub_process where project = '<PROJECT  ID>'));


7. delete states of project (if any)

delete  from EPUB_IND_WORKFLOW where process_id in

(select process_id from epub_process where project = '<PROJECT  ID>');


8. Delete the process

delete from epub_process where project = '<PROJECT  ID>';



9. Additional data cleanup scripts ( since we have already deleted the project from epub_project, this shouldnt exists in that table).

delete from WB_WBENCH_TILE where project_id not in (select project_id from epub_project);

delete from WB_WORKBENCH where project_id not in (select project_id from epub_project);

delete from EPUB_INT_PRJ_HIST where project_id not in (select project_id from epub_project);

delete from EPUB_PR_TG_AP_TS where project_id not in (select project_id from epub_project);

delete from EPUB_PR_TG_STATUS where project_id not in (select project_id from epub_project);





sample code for endeca atg.endeca.assembler.navigation.filter.OrRecordFilterBuilder

 1. Write your own recordbuilderImpl for example, highlighted method needs to be overridden, implement your custom logic to formulate the query. In this example im querying against storeId.

import atg.endeca.assembler.navigation.filter.RecordFilterBuilderImpl;

public class CustomRecordFilterBuilder extends RecordFilterBuilderImpl {

    private String recordPropertyName;

    private String storeId;

    public String getRecordPropertyName() {

        return recordPropertyName;

    }

    public void setRecordPropertyName(String recordPropertyName) {

        this.recordPropertyName = recordPropertyName;

    }

    public String getStoreId() {

        return storeId;

    }

    public void setStoreId(String storeId) {

        this.storeId = storeId;

    }

    @Override

    public String buildRecordFilter() {

        return this.recordPropertyName+":"+this.storeId;

    }

}


2. Custom logic for implementing the OrRecordFilterBuilder

f(storeId.contains(",")){

                OrRecordFilterBuilder orRecordFilterBuilder = new OrRecordFilterBuilder();

                orRecordFilterBuilder.setSecurityFilter(Boolean.FALSE);

                //StoreId is are tokenized by ',' eg. 292,110,101

                StringTokenizer tokenizer = new StringTokenizer(storeId, ",");

                List<CustomRecordFilterBuilder> recordFilterBuilderList = new ArrayList<CustomRecordFilterBuilder>();

                while(tokenizer.hasMoreTokens()){

                   CustomRecordFilterBuilder recordFilterBuilder = new CustomRecordFilterBuilder();

                   recordFilterBuilder.setStoreId(tokenizer.nextToken());

                   recordFilterBuilder.setRecordPropertyName(recordPropertyName);

                   recordFilterBuilderList.add(recordFilterBuilder);

                }

                if(recordFilterBuilderList != null && recordFilterBuilderList.size() > 0){

                    RecordFilterBuilder[] recordFilterBuildersArray = recordFilterBuilderList.toArray( new RecordFilterBuilder[recordFilterBuilderList.size()]);

                    orRecordFilterBuilder.setRecordFilterBuilders(recordFilterBuildersArray);

                    filter = orRecordFilterBuilder.buildRecordFilter();

                    LogUtils.getLogger(this).vlogDebug(" filter ---------->>>>"+filter);

                }

            }


Saturday, June 17, 2023

How to retrieve Weblogic Admin password

 Here are the steps

1. Go to the bin folder 

typically,

cd <WEBLOGIC INSTALL DIR>/domains/mydomain/bin

2. execute setDomainEnv.sh with an extra '.' (dot) for example 

. ./setDomainEnv.sh

3. execute Weblogic WLST command

   java weblogic.WLST

4. Once processing is done and terminal/ command-prompt is in offline 

execute the following steps for retrieving the passord

a. from weblogic.security.internal import BootProperties

b. BootProperties.load("<WEBLOGIC INSTALL DIR>/domains/mydomain/servers/AdminServer/security/boot.properties", false)

c. prop = BootProperties.getBootProperties()

d. print "username: " + prop.getOneClient()

e. print "password: " + prop.getTwoClient()