Thursday 10 December 2015

Web Logic Debug Mode

Go to the path C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin

1.       Copy startWebLogic.cmd file at the same location with name startWebLogic_debug.cmd.

Search for %JAVA_HOME%\bin\java %JAVA_VM% -version in the startWebLogic_debug.cmd file.

Add below 2 lines after this line:

echo "Launching Java with debug port: 8453"
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xdebug -Djava.compiler=NONE -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8453,suspend=n

2.       Copy startManagedWebLogic.cmd at the same location with name startManagedWebLogic_debug.cmd

Search for ‘startWeblogic.cmd’ in startManagedWebLogic_debug.cmd file and replace it with startWeblogic_debug.cmd.

Please find below the changes for reference:
               
                if "%1"=="" (
                                @REM  Call Weblogic Server with our default params since the user did not specify any other ones
                                call "%DOMAIN_HOME%\bin\startWeblogic_Debug.cmd" nodebug noderby noiterativedev notestconsole noLogErrorsToConsole
) else (
                                @REM  Call Weblogic Server with the params the user sent in INSTEAD of the defaults
                                call "%DOMAIN_HOME%\bin\startWeblogic_Debug.cmd" %1 %2 %3 %4 %5 %6 %7 %8 %9
)
               
3.       Now, start the server using the newly created startWeblogic_Debug.cmd file.

4.       Once the server is started, do the following changes in eclipse:

i.                     Click on  Run –> Debug Configurations ->Remote Java Application ->New launch configuration
ii.                   Give the following details:
Name: Any name say Test
Project : Browse and select the required project where the file that needs to be debugged.
Port : 8453

iii.                  Click on Apply and Debug.

Thursday 26 November 2015

How to resolve unable to start atg wizard(Plug-in "atg.project" was unable to instantiate class "atg.eclipse.project.wizard.ProjectWizard".)

How to resolve:

When we are creating new atg project will get below error some times..

The selected wizard could not be started.
Plug-in "atg.project" was unable to instantiate class "atg.eclipse.project.wizard.ProjectWizard".
atg/applauncher/AppLauncherException

Step1 : In Eclipse got Window-->Preferences -->ATG Preferences

In ATG Prefeernces please select/browse the exact path of ATG Root Directory



Step 2.Select the Perspective as ATG 





Step 3: Copy the ATGUpdateSite.jar file from D:\project\ATG\ATG11.1\Eclipse\ATGUpdateSite.jar
to D:\project\Eclipse\plugins Folder

Note : Restart your eclipse if its already opened.

































Wednesday 4 November 2015

IsEmpty and IsNull in ATG

Java differences 


StringUtils.isEmpty()   : checks empty or null)

StringUtils.isEmpty("")        = true
StringUtils.isEmpty(null)      = true
StringUtils.isEmpty(" ")       = false
StringUtils.isEmpty("hoo")     = false
StringUtils.isEmpty("  omg  ") = false




StringUtils.isBlank() : checks white space,null ,empty

 StringUtils.isBlank(null)      = true
 StringUtils.isBlank("")        = true
 StringUtils.isBlank(" ")       = true
 StringUtils.isBlank("hoo")     = false
 StringUtils.isBlank("  omg  ") = false

ATG Droplets


isEmpty Droplet in Atg  :
                            Here we are checking hobbies are empty or not in MyProfile.

 <dsp:importbean bean="atg/dynamo/droplet/IsEmpty"/>
  <dsp:importbean bean="atg/dynamo/droplet/ForEach"/>
 <dsp:droplet name="IsEmpty">
   <dsp:param name="value" bean="MyProfile.hobbies"/>
   <dsp:oparam name="false">
      Your hobbies are:
        <dsp:droplet name="ForEach">
           <dsp:param name="array" bean="MyProfile.hobbies"/>
           <dsp:oparam name="output">
              <dsp:valueof param="element"/>
           </dsp:oparam>
        </dsp:droplet>
   </dsp:oparam>
   <dsp:oparam name="true">
      All work and no play makes Jack a dull boy.
   </dsp:oparam>
</dsp:droplet>


IsNull Droplet in Atg :
                                     Here we are checking email is null or not in MyProfileFormHandler,if its null
we are updating it with the user provided value.

 <dsp:importbean bean="atg/dynamo/droplet/IsNull"/>
  <dsp:droplet name="IsNull">
  <dsp:param bean="MyProfile.email" name="value"/>
  <dsp:oparam name="true">
    <dsp:form action="address_book.jsp" method="POST">
      My email address:
      <dsp:input type="text" bean="MyProfileFormHandler.email"/>
      <dsp:input type="submit" bean="MyProfileFormHandler.update value="Update"/>
    </dsp:form>
  </dsp:oparam>
</dsp:droplet>



Order pipeline chain differances

LoadOrder : 

                                      When an Order is loaded from the Order Repository, the loadOrder() method in the OrderManager calls into the PipelineManager to execute the loadOrder pipeline, which creates and loads the Order object, as well as its OrderPriceInfo and TaxPriceInfo objects.
 


RefreshOrder:

       When an Order property is accessed (for example, by callinggetCommerceItems() or getPriceInfo()), the refreshOrder pipeline is invoked, which creates and loads the rest of the contained objects in the Order.


UpdateOrder:

                
                                        Updates the order in the repository with any changes that may have been made during the execution of this chain (splitting of shipping groups, update of states, etc.).


ProcessOrder

                                        When ever you are committing the order using commitorder() that time processorder pipeline chain will call.

                  

Thursday 2 April 2015

Create New Endeca Application.

Step 1:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Lenovo>cd C:\MY\ENDECA\Apps

C:\MY\ENDECA\Apps>cd C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\bin

C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\bin>deploy.bat --app
04/02/2015 18:40:30 [deploy.pl] FATAL: Invalid application descriptor file
   specified:

C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\bin>deploy.bat --app C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\reference\discover-data\deploy.xml

 ------------------------------------------------------------------------------
   Found version 6.1 of the Endeca IAP installed in directory
   C:\\\MY\ENDECA\\PlatformServices\6.1.4. If either the version or location
   are incorrect, type 'Q' to quit and adjust your ENDECA_ROOT environment
   variable. Press enter to continue with these settings.

   Continue?
    y

 ------------------------------------------------------------------------------
     Deployment Template installation script.

     This script creates the directory structure for your
     deployment and installs configuration files and scripts
     into the directory structure.

  04/02/2015 18:44:42 [deploy.pl] INFO:  Starting deployment template
   installation.

 ------------------------------------------------------------------------------
   The following app modules were specified on the command line argument:

   C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\reference\discover-data\deploy.xml


   Modules may be deployed standalone or on top of a base deployment type. Do
   you want to install a base deployment with the specified module(s)?

   Install base deployment? [Y/N]:
y
04/02/2015 18:44:46 [AppDescriptorReader] INFO:  Parsing application descriptor
   file
   C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\reference\discover-data\deploy.xml.
04/02/2015 18:44:46 [AppDescriptorReader] INFO:  Parsing application descriptor
   file
   C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\app-templates\base_descriptor.xml.

 ------------------------------------------------------------------------------
   Enter a short name for your application.

   Note: The name must conform to this regular expression: ^[a-zA-Z0-9]+$
    [default: Discover]

   Choosing a different application name may require additional configuration on
   your web application.

   Application name:
TESTAPP

 ------------------------------------------------------------------------------
   Specify the path into which the application will be deployed. The specified
   directory must exist and cannot contain spaces.

   For example, to deploy into c:\apps\TESTAPP, specify the path as c:\apps.

   Deployment directory:
C:\MY\ENDECA\Apps

 ------------------------------------------------------------------------------
   Specify the port on which the Endeca Application Controller is running. This
   is configured in the server.xml file in the workspace of the Endeca software
   install and should be the same for all applications deployed in this
   environment. Ports must be in the range 1024-65535 [default: 8888].

   EAC port:
8888
04/02/2015 18:46:05 [deploy.pl] INFO:  Deploying application into
   C:\MY\ENDECA\Apps\TESTAPP

 ------------------------------------------------------------------------------
   What port is the Workbench running? [Default: 8006]


 ------------------------------------------------------------------------------
   What port should be used for the Live Dgraph? [Default: 15000]


 ------------------------------------------------------------------------------
   What port should be used for the Authoring Dgraph? [Default: 15002]


 ------------------------------------------------------------------------------
   What port should be used for LogServer? [Default: 15010]

04/02/2015 18:46:28 [AppDescriptorReader] INFO:  Parsing application descriptor
   file
   C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\app-templates\base_descriptor.xml.
04/02/2015 18:46:28 [deploy.pl] INFO:  Processing install with id 'Dgraph'
04/02/2015 18:46:30 [AppDescriptorReader] INFO:  Parsing application descriptor
   file
   C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\reference\discover-data\deploy.xml.
04/02/2015 18:46:30 [deploy.pl] INFO:  Processing install with id
   'DefaultTemplateManagerApp'
04/02/2015 18:46:32 [deploy.pl] INFO:  Application successfully deployed.

C:\MY\ENDECA\ToolsAndFrameworks\3.1.2\deployment_template\bin>




*************************************************
Step2 :
Once Application is created in the location C:\MY\ENDECA\Apps
run the below command in command prompt
C:\MY\ENDECA\Apps\TESTAPP\control>initialize_services.bat

open http://localhost:8006/ifcr/sites/TESTAPP.html

now you can able to see your created application in ExperianceManager

Tuesday 31 March 2015

1.One to Many  RelationShip Example:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<gsa-template>
   <item-descriptor name="stdinfo" display-property="studentName">
<table name="studentInfo" id-column-name="stdid" type="primary">
<property name="stdid" column-name="STUDENT_ID" data-type="String"/>
<property name="studentname" column-name="STUDENT_NAME" data-type="String"/>
<property name="studentage" column-name="STUDENT_AGE" data-type="String"/>
<property name="studentaddress" column-name="STUDENT_ADDRESS" data-type="String"/>
<property name="state" column-name="STATE" item-type="state" ></property>
<property name="city" column-name="CITY"  item-type="city" ></property>
   </table>
</item-descriptor>

 <item-descriptor name="state" display-property="statename">
<table name="stateInfo" id-column-name="stateid" type="primary">
<property name="stateid" column-name="stateid" data-type="String"/>
<property name="statename" column-name="STATE_NAME" data-type="String"/>
</table>
<table name="state_cities" id-column-name="stateid" type="multi">
 <property name="cities" column-name="cityid" data-type="set" component-item-type="city"/>
</table>
</item-descriptor>


 <item-descriptor name="city" display-property="cityname">
<table name="cityInfo" id-column-name="cityid" type="primary">
<property name="cityid" column-name="cityid" data-type="String"/>
                <property name="cityname" column-name="CITY_NAME" data-type="String"/>          
</table>
</item-descriptor>

</gsa-template>




Wednesday 21 January 2015

Differences between CartModifierFormHandler & ShoppingCartFormHandler?

1.CartModifierFormHandler :- Used to modify the shopping cart by adding items, deleting items and modifying the quantities of items in cart and preparing for checkout.

  ShoppingCartFormHandler Used for handling cart management (add/remove/adjust item quantity) and checkout process (shipping, billing, committing order).

2.CartModifierFormHandler :- you would have to handle checkout flow yourself by using ExpressCheckoutFormHandler in case of express checkout and in case of full checkout by using ShippingGroup & PaymentGroup form handlers and finally CommitFormHandler to confirm and commit the ordr.

  ShoppingCartFormHandler :- Various functions for cart to checkout are exposed via different handleXXX methods.

3.CartModifierFormHandler :-doesn't provide you the checkout flow.

  ShoppingCartFormHandler :- provides simpler cart management and checkout implementation all in itself.

4.CartModifierFormHandler :- would provide some benefits like better handling and security for concurrent updates of orders.

  ShoppingCartFormHandler  : not that much secure for concurrent updates of orders

5.CartModifierFormHandler:Based implementation would not be that simple and require other form handlers.

  ShoppingCartFormHandler  : simple and all checkout flow provided by it.