Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

RE : Token Service to access a crx/server


Level 2



   I am trying to access the crx/server from the cloud dev 

after I completed my testing in local want to test that using the service token the code is in java... attaching the code base

Repository repository = getRepository("");

TokenCredentials tokenCredentials=new TokenCredentials(" XXXXXXX _ XXXXXX_ XXXXX ");

//Create a Session
javax.jcr.Session session = repository.login(tokenCredentials);

 I was seeing an error 




javax.jcr.RepositoryException: Unable to access a repository with the following settings:
The following RepositoryFactory classes were consulted:
org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
org.apache.jackrabbit.commons.JndiRepositoryFactory: declined




I would like to know in java which service can be used ... to make this work...



Thank You,


0 Replies