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

Friday, March 24, 2017

java.lang.ClassCastException: atg.adapter.gsa.GSAItemDescriptor cannot be cast to atg.adapter.gsa.GSAItemDescriptor

ERROR [stderr] (Thread-260) Exception in thread "Thread-260" java.lang.ClassCastException: atg.adapter.gsa.GSAItemDescriptor cannot be cast to atg.adapter.gsa.GSAItemDescriptor
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.custom.AncestorGeneratorService$GSATableAndColumnNames.<init>(AncestorGeneratorService.java:3609)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.custom.AncestorGeneratorService.updateCatalog(AncestorGeneratorService.java:1638)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.custom.TreeWalkUpdateService.performService(TreeWalkUpdateService.java:421)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.CMSService.doService(CMSService.java:214)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.StandardCatalogMaintenance.performService(StandardCatalogMaintenance.java:546)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.CMSService.doServiceWithLock(CMSService.java:256)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.CMSService.doService(CMSService.java:201)
13:12:31,795 ERROR [stderr] (Thread-260)        at atg.commerce.catalog.custom.RunCustomServiceFormHandler$MaintenanceRunner.run(RunCustomServiceFormHandler.java:301)

We were migrating from oracle commerce 10.1.2 to 11.2p2. One of the patches were causing the conflicts.

1. Check if youre using  p16545044_1012_v5_lib.jar. comment out the this patch from the runAssembler call.

-Djava.security.policy=lib/java.policy: No such file or directory

     [echo] runAssembler path is /data/ATG/ATG11.2/home/bin/
     [echo]
     [exec] Error:   -Djava.security.policy=lib/java.policy -Datg.dynamo.home=. -Datg.dynamo.root=./.. -Datg.dynamo.display= -Djava.protocol.handler.pkgs=atg.net.www.protocol -Djava.naming.factory.url.pkgs=atg.jndi.url  -Datg.dynamo.modulepath=./.. -Xms512m -Xmx1024m -XX:MaxPermSize=128m -XX:MaxNewSize=128m -Datg.dynamo.server.home= -Datg.dynamo.modules=:DSS:DSS -Datg.dynamo.layers= -Datg.dynamo.root=./.. -Datg.cygwin=false atg.applauncher.dynamo.DynamoServerLauncher -environment /tmp/dynamoEnv2656.sh :DSS:DSS -classPathModules :DSS:DSS  failed
     [exec] CLASSPATH was ./locallib/:./lib/launcher.jar:/data/ATG/ATG11.2/home/../Tomcat/apache-tomcat-7.0.37/lib/servlet-api.jar:/data/ATG/ATG11.2/home/../Tomcat/apache-tomcat-7.0.37/lib/jsp-api.jar:./../DafEar/Tomcat/atomikos/jta.jar:./../DAS/lib/min-ejb3-api.jar
     [exec] DYNAMO_HOME was .
     [exec] DYNAMO_MODULES was :DSS:DSS
     [exec] ./bin/dynamoEnv.sh: line 347: -Djava.security.policy=lib/java.policy: No such file or directory
     [exec] /data/ATG/ATG11.2/home/bin/runAssembler: line 33: -Xms96m: command not found



This is known bug in ATG, it doesnot create entries in dynEnv.sh  file location

<DYNAMO_HOME>/home/localconfig/dasEnv.sh

Please add these values if youre using jboss [please use appropriate paths]

ATGJRE=/data/jdk/jre/bin/java;export ATGJRE JBOSS_HOME=/data/jboss-as;export JBOSS_HOME JBOSS_VERSION=6.4.0;export JBOSS_VERSION


if youre using weblogic
export ATGJRE=/data/jdk/jre/bin/java;export ATGJRE


export WL_HOME=/data/weblogic/middleware/oracle_Home/wlserver;export WL_HOME


export WL_VERSION=12.0.1;export WL_VERSION


MSC000001: Failed to start service jboss.web.deployment.default-host

14:36:59,418 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.web.deployment.de
fault-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat
-1.jar:1.1.5.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_112]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_112]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_112]
Caused by: java.lang.IllegalArgumentException: JBWEB000250: Child container with name  already exists
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:794)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:353)
        at org.jboss.as.web.deployment.WebContextInjector.inject(WebContextInjector.java:62)
        at org.jboss.as.web.deployment.WebContextInjector.inject(WebContextInjector.java:38)
        at org.jboss.msc.inject.CastingInjector.inject(CastingInjector.java:55) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-red
hat-1]

Solution

1. Check duplicate context path in your ear. if duplicate context paths is present please modify the context path to be different.
2. Check configuration.xml  set enable-welcome-root="false" eg.<virtual-server name="default-host" enable-welcome-root="false">