This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi to everybody,
I'm new to CQ and I'm tryng to connect to CRX's CQ from a custom component in LiveCycle.
First of all, i made a project in Eclipse in which do all the operation required (retrieve a node, store node, etc..), and testing the methods inside Eclipse it works
My problem starts when importing and executing the custom component inside LiveCycle, because cannot connect to CRX (while testing it in Eclipse, calling the same method, everything works)
The error:
javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: http://172.31.0.51:8080/lc/crx/server
The following RepositoryFactory classes were consulted:
Perhaps the repository you are trying to access is not available at the moment.
I see other post relative to this error, but these suggests doesn't have helped me
- http://forums.adobe.com/message/5228023
- http://forums.adobe.com/message/4734716
For who wants, it's possible to download the project (.zip) from here
[note that the file it's 60MB because included the jar jackrabbit-standalone-2.4.5 - thats the way i found to make it works in Eclipse]
Zip of the Eclipse project
https://drive.google.com/file/d/0B9WReKLIV7H-bTdFVGNTLXVzUnM/edit?usp=sharing
Jar to deploy in Livecycle
https://drive.google.com/file/d/0B9WReKLIV7H-ZDluQml6S3RHbTQ/edit?usp=sharing
Could someone help me?
Any help would be really appreciate :)
Solved! Go to Solution.
Views
Replies
Total Likes
For CQ 5.6 -- read this KB about using RMI and CQ 5.6:
http://helpx.adobe.com/experience-manager/kb/rmi-connection-crx-cq-561.html
Once you get RMI configured -- try coding the connection to CQ from the LC DSC using the code shown in the above KB. The last thing you will have to do is place the correct Jackrabbit RMI JAR files in the DSC class path.
Views
Replies
Total Likes
We have articles that go from:
AEM -> LC
However - this is the first time i have seen a request from:
LC --> AEM.
I will see if i get the same issue as you when i write a custom DSC that uses JCR API to modify a remote AEM JCR.,
Views
Replies
Total Likes
I have verified that using the JCR API from within the LC Service container via a custom LC DSC does throw this exception:
2014-03-18 23:49:40,319 ERROR [STDERR] javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: http://aemser1:4502/crx/server
The following RepositoryFactory classes were consulted:
I will dig around and see if other internal Adobe people have done this. If so - what is the work around.
Views
Replies
Total Likes
Another option you have to get data into AEM from a LC DSC is using Java HTTP APIs and perform RESTFul requests using the Sling Post Servlet.
See this community article on how to use AJAX to submit data to AEM by using the Sling Post Servlet:
http://helpx.adobe.com/experience-manager/using/using-sling-post-servlets.html
In your case - instead of using JavaScript and AJAX - you can use Java HTTP APIs and perform a restful request to AEM that represents a sling post servlet.
Here is the sling post servlet cheat sheet:
http://dev.day.com/docs/en/cq/current/developing/sling_cheatsheet.html
Views
Replies
Total Likes
Thank a lot for your response / contribution
Thanks for your workaround, I will put on this solution in the next few hours. (i'm writing from Italy)
The need to use the JCR API remain, because we use the CRX to handle a fair amount of data (load up to 5000 nodes and we associate to each of these nodes a jcr: content [xml file]) and the use of REST calls may have an impact on performance.
So I hope to find a solution to this type of implementation (via JCR API)
Speaking with a colleague, he told me that the problem could be the lack of proper JAR,but I have included in the component (fisrt in the classpath of Eclipse and also in the libs folder) the jar jackrabbit-standalone-2.4.5* and indicated this jar in the tag <class-path> of component.xml: also in this way the exception occurs.
I will update this post with more news and information.
And I hope to receive more feedback, advice and help;)
* This should include all the Jar Jar related to Jackrabbit
Views
Replies
Total Likes
Hi Scott, thank you for your reply.
I, and my colleagues, already used the resource you have just suggest.
Infact I have develop a custom component that connect to a CRX inside Livecycle ES3/ES4, but this is not our requirement any more - because now we want to connect directly to the CRX of an external CQ (or any jackRabbit implementations)
Here we have continued to inspecting the code, also because it's strange that inside Eclipse work while in the Livecycle context it doesn't.
During mine test and check I avoid to use the method
JcrUtils.getRepository("http://localhost:7402/crx/server");
but used the RepositoryFactory implementation:
String uri = getCrxHost(); Map<String, String> parameters = new HashMap(); parameters.put("org.apache.jackrabbit.repository.uri", uri); Repository repository = null; Ierator<RepositoryFactory> iterator = ServiceRegistry.lookupProviders(RepositoryFactory.class); while (repository == null && iterator.hasNext()) { repository = iterator.next().getRepository(parameters); }
and We have found that inside Livecycle these instruction
Iterator<RepositoryFactory> iterator = ServiceRegistry.lookupProviders(RepositoryFactory.class);
return a void iterator, while in Eclipse we get some values and it's possibile get CQ jackRabbit repository
[img]forumAdobe_1.jpg[/img]
Do you have any ideas why this happen in LiveCycle?
Views
Replies
Total Likes
Here is a LC/AEM connector that was recommended for use in this use case:
http://help.adobe.com/en_US/livecycle/10.0/content_repository_connector.pdf
Hope this helps.
Views
Replies
Total Likes
This use case has grabbed my attention. I too created a custom DSC that contains the JCR API JAR. TO get this DSC successfully deployed to LC - i had to change this MySQL setting in the MySQL config file:
# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8
#Query cache type to use.
query_cache_type=2
#Max packetlength to send/receive from to server.
max_allowed_packet=80M
However -- once I did -- it successfully deployed and i was able to create a LC process with the new AEM JCR operation:
[img]LCAEM.png[/img]
But i encountered the same issue as you and I am currently waiting to hear back.
I suspect what is happening in the LiveCycle Service COntainer is something is blocking access to the AEM Repository at this line of code (which as you pointed out works in Eclpise and INtelliJ):
Repository repository = JcrUtils.getRepository("http://[AEM_IP]:4502/crx/server");
I am thinking that we may be able to get this to successfully return a Repository instance in the LC DSC if we configure AEM to support RMI and use RMI to get the Repository object.
JcrUtils.getRepository(
"rmi://[AEM_IP]:1099/crx"
);
http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html#Accessing a Repository via RMI
Views
Replies
Total Likes
For CQ 5.6 -- read this KB about using RMI and CQ 5.6:
http://helpx.adobe.com/experience-manager/kb/rmi-connection-crx-cq-561.html
Once you get RMI configured -- try coding the connection to CQ from the LC DSC using the code shown in the above KB. The last thing you will have to do is place the correct Jackrabbit RMI JAR files in the DSC class path.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies