title: Programmatically Accessing CQ5 Content using the JCR
body: <p>I would like to access the content programmatically, I tried the following:</p>
  
  <pre><code>private Session getSession(String user, String passwort) {
          Session session = null;
          try {
              Repository repository = JcrUtils.getRepository("http://localhost:4503/crx/server");
              JcrUtils.getRepository("http://localhost:4503/crx/server");
              session = repository.login(new SimpleCredentials(user, passwort.toCharArray()));
          } catch (RepositoryException e) {
              LOG.error(e.getMessage());
          }
          return session;
      }
  </code></pre>
  
  <p>I get the following exception when I call the <code>getRepository</code> method:</p>
  
  <pre><code> javax.jcr.RepositoryException: Unable to access a repository with the following settings:
          org.apache.jackrabbit.repository.uri: http://localhost:4503/crx/server
      The following RepositoryFactory classes were consulted:
      Perhaps the repository you are trying to access is not available at the moment.
  </code></pre>
  
  <p>I have the version cq5.4. Any idea?</p>
  
  <p>P.S: I tried to Access publish and author instance and got the same exception.</p>