Saturday 18 May 2019

jdeps | Great JDK 8 Command-line Static Dependency Checker tool

While exploring new technical stuff, I came across wonderful JDK 8 command line tool. This is called jdeps (Java class dependency analyzer). It is useful for quickly identifying static dependencies of libraries. The jdeps command-line tool is easy to use and quickly identifies static dependencies on a provided JAR and its package or class contents.The level of detail shown is configurable and some ways of configuring this command's output are shown next.

The following screen snapshot (cropped image, doesn't include full output) demonstrates basic usage of the jdeps command executed for tools.jar (java library jar).

Jdeps Output
To print class level dependency use -v option.

Jdeps Class Level Output

There are a few more useful options available for use with jdeps that are not covered in this post, but these can be seen by running jdeps -help.

Wednesday 15 May 2019

Resolved | GIT branch switch issue

While using GIT, encountered a special scenario. I was working on one branch. There were no changes local. Then I decided to switch to different branch.

I have faced below error.
===========================================================================
$ git checkout New_Temp_Branch
error : The following untracked working tree files would be overwritten by checkout:
      <list of files here>
Please move or remove them before you can switch branches.
Aborting
===========================================================================

Solution : Use below set of commands.

git add *
git stash
git pull

This will track all files, remove all of your local changes to those files, and then get the files from the server.

Endeca Terminology

While studying about Endeca ,I have seen interesting terms related to Endeca. Here is the list of terms along with their meaning.

Navigation State The navigation state is the set of all dimension values selected in the current query context,the navigation state record set consists of the records selected by the navigation state.
Descriptor Dimensions Descriptor dimensions contain the dimension values (or descriptors) that were used to query for the current record set. Integrated dimensions represent a consolidation of those dimensions that contain either descriptors or refinement values for the current record set.
Complete Dimension Complete dimensions represent a consolidation of all dimensions that have at least one of the following:
a descriptor, a standard refinement, or an implicit refinement.

Snippeting The snippeting feature (also referred to as keyword in context or KWIC) provides the ability to return an excerpt from a record—called a snippet—to an application user who performs a record search query.

Wildcard search Wildcard search allows users to match query terms to fragments of words in indexed text.

Pivoting The activity of adding or removing dimension values to or from the navigation state is known as pivoting.

Positional Indexing To enable faster phrase search performance and faster relevance ranking with the Phrase module,your project builds index data out of word positions.This is called positional indexing.

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