I got it myself. I've removed almost the complete CLASSPATH from my client and replaced it with the jackrabbit-standalone-2.2.13.jar. That solved it. I found this hint on page http://dev.day.com/content/ddc/blog/2010/06/crx_gems_jca_connec.html.
But nevertheless I'm looking for a good doc to start with; something comparable with "Learning Java".
I am trying to connect to remote JCR using the similiar code as above. But I am getting below exception.
Exception in thread "main" javax.jcr.RepositoryException: Unable to access a repository with the following settings:
The following RepositoryFactory classes were consulted:
because of RepositoryException: Failed to read the resource at URL http://localhost:4502/crx/server
because of StreamCorruptedException: invalid stream header: 3C68746D
Perhaps the repository you are trying to access is not available at the moment.