Exception while accessing AEM repository
We have two AEM instances and trying to access one AEM instance repository on other AEM instance.
I've created workflow process where I used below to code to access. But it is throwing below exception when the process is executed.
Piece of code:
Repository repository = JcrUtils.getRepository("http://localhost:4502/crx/server");
//Create a Session
Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()),"crx.default");
Exception: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: localhost:4502/crx/server
The following RepositoryFactory classes were consulted:
Perhaps the repository you are trying to access is not available at the moment.
But the same code is working when I write Standalone java class to access AEM repository and it is not working only when I try to access AEM repository from other AEM server. Please advise if I'm missing anything. Quick response would be appreciated.
Thanks
