Hi All,
I have just written sample java utility to get connection from AEM which is installed in cloud server.Below code snippet only i have used to get the session.Application is running in JBoss server.
Repository repObj = JcrUtils.getRepository("URL");
sessObj = repObj.login(new SimpleCredentials("user", "password".toCharArray()));
Below exception is being thrown.
javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: <URL>
The following RepositoryFactory classes were consulted:
org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
Perhaps the repository you are trying to access is not available at the moment.
at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:217)
at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:257)
at com.sample.cqexamples.GetCRXSession.getCRXSession(GetCRXSession.java:19)
at com.sample.cqexamples.GetCRXSession.main(GetCRXSession.java:33)
Exception in thread "main" java.lang.NullPointerException
at com.sample.cqexamples.GetCRXSession.main(GetCRXSession.java:33)
To get connection from any standalone class ,do i need to change JBOss start up script?
Please help if anyone have encountered this kind of issues.
Thanks,
Kishore.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
This part:
The following RepositoryFactory classes were consulted: org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
Indicates that a JAR file (jackrabbit-jcr2dav) is missing from your classpath. See this old thread: https://forums.adobe.com/message/5162978
Regards,
Justin
Views
Replies
Total Likes
Hi,
This part:
The following RepositoryFactory classes were consulted: org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
Indicates that a JAR file (jackrabbit-jcr2dav) is missing from your classpath. See this old thread: https://forums.adobe.com/message/5162978
Regards,
Justin
Views
Replies
Total Likes
This Exception suggests that your URL is wrong to AEM.
javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: <URL>
Once AEM is running on a server - you can connect to it via the JCR API and specifying the correct URL. See:
http://helpx.adobe.com/experience-manager/using/integrating-custom-carousel-component-cq.html
Views
Replies
Total Likes