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()


Sunday, August 12, 2018

Cassandra Error :CassandraDaemon.java:708 - Exception encountered during startup



Error log


INFO  [main] 2018-08-12 11:36:01,276 IndexSummaryManager.java:85 - Initializing index summary manager with a memory pool size of 200 MB and a resize interval of 60 minutes
Exception (java.lang.RuntimeException) encountered during startup: java.net.BindException: Can't assign requested address
java.lang.RuntimeException: java.net.BindException: Can't assign requested address
at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:753)
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:692)
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:676)
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:777)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:664)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:613)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:379)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691)
Caused by: java.net.BindException: Can't assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:742)
... 8 more
ERROR [main] 2018-08-12 11:36:01,309 CassandraDaemon.java:708 - Exception encountered during startup
java.lang.RuntimeException: java.net.BindException: Can't assign requested address
at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:753) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:692) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:676) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:777) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:664) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:613) ~[apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:379) [apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602) [apache-cassandra-3.11.3.jar:3.11.3]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691) [apache-cassandra-3.11.3.jar:3.11.3]
Caused by: java.net.BindException: Can't assign requested address
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_151]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_151]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_151]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_151]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_151]
at org.apache.cassandra.net.MessagingService.getServerSockets(MessagingService.java:742) ~[apache-cassandra-3.11.3.jar:3.11.3]
... 8 common frames omitted
INFO  [StorageServiceShutdownHook] 2018-08-12 11:36:01,321 HintsService.java:220 - Paused hints dispatch



Solution #
 Goto conf folder and open cassandra.yaml and change the hostname from locahost to "127.0.0.1" for listen_address and rpc_address and restart the cassandra server. 

Tuesday, March 28, 2017

How to enable CSC order search to return all search results?

By default,CSC Order search returning only first 100 results.


Solution:-

To enable order search to return all the order results

Add these properties to your configuration

/atg/commerce/custsvc/order/OrderSearchTreeQueryFormHandler.properties

#set maxSearchResults to -1 inorder return all the search results
maxSearchResults=-1
#set maxSearchResultsPerPage to 20 or anything appropriate.
maxSearchResultsPerPage=20