Showing posts with label Site. Show all posts
Showing posts with label Site. Show all posts

Wednesday, 15 May 2019

Resolved | Endeca export site failure

Export site failed with below exception.
==========================================================================
Can't load log handler "com.endeca.soleng.eac.toolkit.logging.RelativePathFileHandler"
java.io.IOException: Couldn't get lock for /srv/endeca/apps/Store/logs/Store.%u.%g.log
java.io.IOException: Couldn't get lock for /srv/endeca/apps/Store/logs/Store.%u.%g.log
        at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
        at java.util.logging.FileHandler.<init>(FileHandler.java:254)
        at com.endeca.soleng.eac.toolkit.logging.RelativePathFileHandler.<init>(RelativePathFileHandler.java:93)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:374)
        at java.util.logging.LogManager$4.run(LogManager.java:690)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:683)
        at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1255)
        at java.util.logging.LogManager.access$1300(LogManager.java:148)
        at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1338)
        at java.util.logging.Logger.log(Logger.java:609)
        at java.util.logging.Logger.doLog(Logger.java:631)
        at java.util.logging.Logger.log(Logger.java:654)
        at java.util.logging.Logger.fine(Logger.java:1204)
        at com.endeca.soleng.eac.toolkit.Controller.parseArgs(Controller.java:1036)
        at com.endeca.soleng.eac.toolkit.Controller.main(Controller.java:136)
[02.17.17 11:17:18] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[02.17.17 11:17:28] SEVERE: Caught an exception while checking provisioning.

Caused by com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.application.Application isDefined - Caught exception while querying for defined application list.
Caused by com.endeca.eac.client.EACFault
sun.reflect.NativeConstructorAccessorImpl newInstance0 - null


==========================================================================
Solution :
         1)      Stop the EAC (Endeca HTTP Service)
         2)      Rename the directory 
ENDECA_CONF/state to state-backup
         3)      Create an empty state directory
         4)      Start the Endeca HTTP Service again 

Sunday, 25 December 2016

Endeca | Add a new site to an existing application

You can easily add new site to existing endeca application by following below steps.

Nature

1. Export the application you want to modify (Add a site).
   a. Navigate to application control directory.
   b. Invoke this command to export application.
        runcommand.<bat|sh> IFCR exportApplication <destination directory>
   c.  Navigate to destination directory and unzip the exported zip file.

2. Add the default site ID, site node and site definition for you new site.
  a. Navigate to the pages node(directory) of your unzipped exported application. 
  b. Open the _.json file in an editor and add a default site ID.
      For example:
      {
         "defaultSiteId": "/TestStoreDE",
         "ecr:type": "page-root"
      }
  c) Navigate to the <export directory>\pages directory. Note that the application already has an
      existing site. For example, the Store application has an existing site with TestStoreUS as the
      site_ID.
  d) Create a folder for your new site parallel to the existing site. The name that you provide for the folder
       becomes the site_ID, for example
TestStoreDE.
  e) Navigate to the existing site in your application, for example pages\
TestStoreUS.
  f) Copy the site definition file, _.json, from the folder and paste it into your new site folder, for example
      pages\
TestStoreDE\_.json.
  g) Use a text editor to update the site definition with unique information appropriate for your new site. For example, the following new site has been updated with a unique URL pattern, display name, and
      description.
      {
          "ecr:type": "site-home",
          "urlPattern" : "/
TestStoreDE",
          "displayName" : "German Store",
          "description" : "This is German Store",
      }

  h) If you want the site to have its own unique icon to identify it in Experience Manager, you can replace
      the default site icon with one of your own by copying an image to the same directory as the site's
      JSON file.The image must be 16 by 16 pixels, and be named siteIcon.<extension>, for example
      pages\TestStoreDE\siteIcon.png. The supported formats are JPG, JPEG, PNG, GIF, and TIF.         Oracle recommends using the PNG format.
  i) Save and close the file.

3. If you want your site to filter a subset of relevant records, you need to add a site-based filter to your site.
    a) Navigate to the new site directory pages/<new site_ID>, for example pages/TestStoreDE.
    b) Create an XML file and name it filterState.xml. The following file filters records so that only those
         records in the furniture category can appear in the site.
          <Item class="com.endeca.infront.navigation.model.FilterState"
                     xmlns="http://endeca.com/schema/xavia/2010">
                   <Property name="recordFilters">
                     <List>
                          <String>product.category:furniture</String>
                     </List>
                   </Property>
          </Item>
   c) Save and close the file.
4. A site needs at least one page in order to display so copy and paste pages that you want from your original site to your new site.
For example, you could copy the browse or account folder from pages/TestStoreUS to pages/TestStoreDE.
5. Import the content with the new site information.
   a. Navigate to application control directory.
   b. Invoke this command to import updated application.
       runcommand.<bat/sh> IFCR importContent pages <path to source>.

Sunday, 31 August 2014

Associating a site with Catalog in ATG

Today while importing the catalog data in BCC. I faced one issue.After completion of data load into BCC I realized that site information is missing from catalog items (category,product and SKUs).

Here is the list of steps I followed from ATG documentation to resolve this issue.


Note : Before following these steps.Run a full deployment fololwoed by Catalog Update Service (This will also create project in BCC.You need to deploy the project). 

Steps to register/create a site and associate it with a catalog.
  1. In the Business Control Center, expand Site Administration, then click Manage Site Assets.
  2. Enter a name and optional description for the project and click Continue.
  3. Create a new site and assign the existing application’s catalog as the default catalog for the new site. During this step, the site ID for the new site is assigned to the existing catalog. The same ID is also assigned to any of the catalog’s categories and sub-catalogs.
  4. At this point, existing catalog folders will appear in Merchandising as unsited items. If you want to keep them, these folders also need a site ID. Follow the steps below to assign a site ID to your catalog folders:
    • In the Business Control Center, expand Merchandising, then click Manage Commerce Assets.
    • Enter a name and optional description for the project and click Continue.
    • Navigate to Site Catalogs, then to Unsited Items.
    • Click the split screen icon at the bottom left of the window.
      BCC Split Screen Icon
      BCC Split Screen Icon
    • In the bottom portion of the split screen, navigate to Site Catalogs.
    • Drag a catalog folder from the top pane to the site you want it affiliated with in the bottom pane. The catalog folder is now affiliated with the site and has that site’s ID assigned to it.
  5. Deploy the project. During deployment, the site ID you assigned to the catalog is propagated from the catalog down to its constituent products and SKUs (by the CatalogMaintenanceService, which runs automatically on deployment).