I would like to access the content programmatically, I tried the following:
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;
}
I get the following exception when I call the getRepository method:
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.
I have the version cq5.4. Any idea?
P.S: I tried to Access publish and author instance and got the same exception.
error.log? - anotherdave