Not able to connect to CRX repository from standalone class
Hi All,
I have written simple Java class to connect to repository and get the session but it's throwing below error.
javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: http://<hostname>:<port>/wcm_author/crx/server
The following RepositoryFactory classes were consulted:
org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined
org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined
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:223)
at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:263)
at GetCRXSession.getCRXSession(GetCRXSession.java:16)
at GetCRXSession.main(GetCRXSession.java:29)
Exception in thread "main" java.lang.NullPointerException
at GetCRXSession.main(GetCRXSession.java:29)
My CQ(Vers. AEM 5.6.1) instance is running as part JBOSS server,do i need to change any configurations(like sling.properties or any) to connect to repository.I have placed below listed jars in eclipse class path.
commons-codec-1.9.jar
commons-collections-3.2.1.jar
commons-httpclient-3.1.jar
commons-logging-1.2.jar
jackrabbit-jcr2dav-2.5.3.jar
jackrabbit-jcr2spi-2.6.2.jar
jackrabbit-jcr-commons-2.7.0.jar
jackrabbit-spi-2.7.0.jar
jackrabbit-spi2dav-2.6.2.jar
jackrabbit-spi-commons-2.7.0.jar
jackrabbit-webdav-2.6.2.jar
jcr-2.0-b19.jar
slf4j-api-1.6.6.jar
If anyone came across already issue ,please help me.
Thanks In Advance
Thanks,
Kishore