I am not able to login to the crx.default workspace using following code:
Repository rep = JcrUtils.getRepository();
SimpleCredentials creds = new SimpleCredentials(userid, pwd.toCharArray());
javax.jcr.Session sess = rep.login(creds,"crx.default");
It is giving me following exception:
at org.apache.jackrabbit.core.RepositoryImpl.getWorkspaceInfo(Repository Impl.java:778)
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1 482)
at org.apache.jackrabbit.core.TransientRepository.login(TransientReposit ory.java:360)
Thanks in advance!
By default, getRepository() will create an instance of Jackrabbit's TransientRepository. Assuming this code is running outside of CRX/CQ, you probably want to connect via DavEx which you would do by supplying a URL to getRepository(). See http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.ht ml#Accessing%20a%20Repository%20via%20JCR%20Remoting%20based%20on%20We bDAV
I am not using WebDAV. I am trying to access the repository using jcr-2.0.jar API through eclipse environment. Getting the same error.
Looking for an appropriate method of connecting DAY CQ crx.default repository and updateing privilege rights for a node.
Could you please help in:
1. Connecting Day CRX repository through Eclipse environment.
2. Creating read, write privilege for a node.
The JCR API is just that, an API. It needs an implementation to work. If you are connecting to CRX from an external webapp, DavEx is the most performant way to do so. RMI is also an option, but may not be supported depending upon the CRX/CQ version you are using.
That said, I don't know if Access Control Management works via remote access: https://issues.apache.org/jira/browse/JCR-2113
One option would be to install the Sling Jackrabbit AccessManager bundle: http://sling.apache.org/site/managing-permissions-jackrabbitaccessmana ger.html
We tried to use sling architecture earlier using day environment. As per our understanding the sling architecture is embedded in Day CQ and we can use the urls and the forms in a component jsp to manage the nodes. We have a little different requirement:
Our problem statement is as follows:
> We are trying to use .NET framework and C# language to manage day CQ crx respository. For this we need to login by admin user id and admin password for getting crx.default repository and create and delete nodes and node permissions.
Please guide us with a suitable method to resolve the above mentioned problem.
To install OSGi bundles in CQ, you can use the JCR Installer feature by placing bundles in /apps/[yourappname]/install. See http://dev.day.com/docs/en/cq/5-4/deploying/configuring_osgi.html#Best %20Practices%20for%20Managing%20OSGi%20Bundles for details.
As I understand it, you are trying to build an external CQ management tool in C#. To do this, I'd recommend using HTTP-based services deployed inside CQ to expose the various management operations you need. Some of this may be provided by pre-existing solutions, e.g. the Sling POST servlet for content maniuplation, the Sling Jackrabbit AccessManager bundle for ACL management, etc.
If you could provide us a guide which can describe how to use pre-existing solutions, e.g. the Sling POST servlet for content maniuplation, etc. It would be of great help.
Thanks in advance!!
For information about building an OSGi bundle that can query and manipulate the Adobe CQ JCR (using the JCR API), see http://scottsdigitalcommunity.blogspot.ca/2013/02/querying-adobe-exper ience-manager-data.html.