Saturday, 17 May 2014

Resolving access denied issue while running install_service script in windows.

After installing Tools and Framework you need to run install_service script to install tools and framework as windows service.If you run this script as normal user(non administrator). You will face access denied issue.

To resolve this issue run the script as administrator.Right click on script file then select run as administrator option.Now script will execute successfully.

Wednesday, 7 May 2014

Endeca CSV Indexing Issues

I used csv file for indexing.Sometime I faced data corruption or indexing failure issues.Below are the possible reasons.

Indexing fails due to any one of the below reasons.
1.In csv format data,data contains extra column due to delimeter character presence in source data.
2.In the case property length exceeds the configured value.

Solution : Write the encoded delimeter from source data to csv file.Control the property length during csv file extraction.

Data corruption issues are happening due to improper handling of empty columns in the csv file.Due to missing columns subsequent column values are assigned to missing column header property.For example you are having three column A,B and C in csv file.If some record r is not having value for column A then column B value is assigned to column A header and column C value is assigned to column B header source property.In this way it results in data corruption.In the case Endeca is not behaving as expected then verify the generated csv file.

Note : When you are using csv file the number of column in each line of file must match the number of column in the header(source property values) line.For every empty or missing value put the empty column with proper delimeter. CSV file generation(extraction) code must be robust enough to handle these scenarios.

Sunday, 16 March 2014

Dyn/admin home page issue in ATG10.2

I encountered below error while trying to open the home page of dyn/admin in ATG10.2.

Unable to execute the command javac -classpath C:\apps\java\jre\lib\resources.jar;C:\apps\java\jre\lib\rt.jar;C:\apps\java\jre\lib\sunrsasign.jar;C:\apps\java\jre\lib\jsse.jar;C:\apps\java\jre\lib\jce.jar;........................................................................................................................./atg/dynamo/servlet/pagecompile/PageCompileServlet The detailed exception is: java.io.IOException: Cannot run program "javac": CreateProcess error=206, The filename or extension is too long.

Follow below steps to resolve this issue.

Add ExtendedJhtmlPageProcessor component at atg\dynamo\servlet\pagecompile\ location and restart the sever.
Steps

1. Navigate to ATG_HOME\localconfig directory.

2. Create atg\dynamo\servlet\pagecompile directory structure there.

3. CreateExtendedJhtmlPageProcessor.properties file with below content in that directory.

     #atg\dynamo\servlet\pagecompile\ExtendedJhtmlPageProcessor.properties
     $class=atg.servlet.pagecompile.jsp11.JSPPageProcessor
     javaCompilerClassName=atg.servlet.pagecompile.SunJavaSourceCompiler

Saturday, 15 March 2014

WebLogic Server getting boot identity from the user issue solution

I have just started using WebLogic Server. I tried to start one of the managed server from command line it stucked at. 

getting boot identity from the user

I entered admin username followed by password then it continued.In this way every time you need to enter username/password.

With below small  and easy configuration you can resolve this issue (Avoid authentication prompt).

1. Create boot.properties in $DOMAIN_HOME/servers/[server_name]/security directory.

2. Put content in below format in the file.
      username=[superuser with admin role]
      password=[password of user(admin role)]

3. Alternatively you can copy boot.properties from  $DOMAIN_HOME/servers/AdminServer/security,then alter the file accordingly.

Note : WebLogic only prompts for username/password when running in Production mode it won't prompt for username/password in development mode.


Sunday, 9 March 2014

Introduction to Endeca Application Controller (EAC)

The EAC provides the infrastructure to support Endeca application.Endeca Application Controller (EAC) is a control system used to control, manage,and monitor components in Endeca implementation.

There are two types of EAC instances.

1. EAC Central Server
2. EAC Agent

1. EAC Central Server

One instance of the EAC serves as the EAC Central Server.The EAC Central Server also contains a repository that stores provisioning information — such as, data about the hosts, components, applications and scripts.This instance includes and WSDL enabled public interface.Other applications communicates with EAC using this interface.EAC central server works as an controller of EAC agents.EAC central server communicates with EAC agents using internal web service interface.

2. EAC Agents 

EAC instances other then EAC Central server are EAC agents.These EAC agents instruct host machine for execution of actual task such Forging or Indexing.

There are 3 ways to communicate with EAC.

1. Endeca Workbench.
2. The command line utility, eaccmd.
3. Endeca WSDL-enabled interface(using language that supports web services).Endeca workbench and Endeca deployment template utilize this method.

You can use below scripts to start and stop EAC from commandline.
1. EAC start script.
   $ENDECA_ROOT/tools/server/bin/startup.sh
2. EAC stop script.
   $ENDECA_ROOT/tools/server/bin/shutdown.sh
Note : On windows EAC is created,configured and registered as "Endeca HTTP service".

EAC configuration file
EAC reads configuration from eac.properties file.This file is located in the $ENDECA_CONF/conf directory.

EAC log file.
EAC log file is located in the $ENDECA_CONF/logs directory.You can update EAC logging related configuration in the logging.properties file.This file is located under $ENDECA_CONF/conf.

Tuesday, 4 February 2014

Useful Linux Commands

Sometimes we need to work on Linux environment during development specially on Linux box hosting the server.As we know Linux is bundled with lots of useful commadline features, file handling is one of them.Here is small list of commands which I feel very useful while working on Linux.

Note : Command syntax/example given below are based on requirements/assignment I worked upon.Every command below may have multiple options,which can be used in different combination based on scenarios(requirement).For example I am redirecting output to a file which can also be displayed on console.

      1.  Secure File Copy.

          Using this feature you can securely copy file from one machine to another machine without login into any of the machine. 
            Syntax : scp user1@machine1:Path of source file user2@machine2:Path of the destination directory
            Example :scp admin@192.168.0.101:/opt/file/Test.jar jboss@192.168.0.109:/opt/jboss/app/lib

      2.  Fetching the specific line range from file and write result to another file.

           Syntax : sed -n 'startLineNumber,EndLineNumberp' fileToBeSearch > resultFile
           Example : sed -n '1,500p' Data.csv > SmallData.csv
 
      3. Fetching the line containing given text from file.
          Syntax :grep searchText SourceFile > FileContainingResultData
          Example : Search For single String
            grep nike BrandData.csv > NikeData.csv

          Example : Search For 2 Strings with OR operation
            grep 'nike\|adidas' BrandData.csv > NikeORAdidasData.csv

          Example : Search For 2 Strings with AND operation  
           grep nike BrandData.csv  | grep shoe > NikeANDShoeData.csv 
 
      4.  Changing file or directory (folder) permissions.
        Sometimes it required to change the permissions of an file or directory in order to perform certain operations.
            Syntax : chmod permissionOctalCode fileOrDirectoryName
            Example : chmod 777 data
            chmod 777 Record.csv
            Note : Use -R option to recursively change the permission of the directory.
           
      5.  Searching file by name.
            find command is very useful to search files.
            Syntax : find directoryToSearch -name fileName
            Example : find / -name 'eaccmd.sh'

      6.  Access environment as different user.
            Using below command you can access the environment as an different user.Mostly it is used to access the environment as more privileged user(root). 
            Syntax : sudo su - userName
            Example : sudo su - admin

      7.  Navigate to previous directory.
             Using below command you can navigate to previous directory from where you have navigated to current directory.
             Syntax : cd - 

      8. Create a zip file.
            Using below command you can add single or multiple files to zip.
            Syntax : zip nameOfZip.zip file1 file2 ...
            Example : zip Log.zip server.log console.log

      9. Unzip the zipped file.
           Use below command to unzip the zipped file.
           Syntax : unzip nameOfZip.zip
           Example : unzip Log.zip
         
    10.  Display content of zip file without extracting it.
           You can display the content of zip file without extracting it.
           Syntax : unzip -l nameOfZip.zip

           Example : unzip -l Log.zip

     11.  Delete all lines containing specific text from a file.Without opening the file.
           You can delete all lines containing 'some string' from a file without opening it.
           Syntax : sed 
--in-place '/some string/d' myfile
           Example : sed --in-place '/nike/d' Brand.csv

For more detail on any of the above commands use man command(manual pages or man pages).

Monday, 3 February 2014

Solution for signer information error (occuring at server startup or on browsing) for ATG 10.1 CRS

I have configured CRS (Commerce Reference Store) for ATG 10.1 using CIM (Configuration and Installation Manager). After server startup I tried to browse the application but only header was displaying.Server was throwing below exception.

ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.SecurityException: class "atg.commerce.order.OrderHolder$$EnhancerByCGLIB$$e9ab456d"'s signer information does not match signer information of other classes in the same package
     at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
     at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
     at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219) 


Solution :  Replace the jboss-eap-5.0/jboss-as/common/lib/cglib.jar with the unsigned version, which can be downloaded from the following URL : http://repository.jboss.com/maven2-brew/cglib/cglib/2.2/cglib-2.2.jar or http://search.maven.org/remotecontent?filepath=cglib/cglib/2.2.2/cglib-2.2.2.jar.
This is due to a problem with the JBoss cglib library.For more details see the JBoss bug https://jira.jboss.org/jira/browse/JBPAPP-2971.