add Alfresco 5 repository as external liferay 6.2 repository - liferay

I would use Alfresco repository from my liferay system.
I used this info Liferay wiki about CMIS repository integration
Both Liferay and Alfresco using the same LDAP.
I create in my liferay a custom Document and media portlet that show external Alfresco repository.
But id logout as admin and login as user, the portlet don't show the external repository.
Furthermore after some log-in and log-out also admin is unable to see external repository and the portlet (that must show alfresco User Home folder) now show thie error: The folder could not be found.
I see in Liferay logs error like
No channel exists with user id 11439
or like
08:59:01,255 ERROR [RuntimePageImpl-15][render_portlet_jsp:132] null
com.liferay.portal.NoSuchRepositoryEntryException: No RepositoryEntry exists with the primary key 14723
at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2678)
at com.liferay.portal.service.persistence.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2696)
at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.createRepositoryImpl(RepositoryLocalServiceImpl.java:418)
at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.getRepositoryImpl(RepositoryLocalServiceImpl.java:367)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.liferay.portal.service.impl.RepositoryServiceImpl.getRepositoryImpl(RepositoryServiceImpl.java:140)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.getFolderRepository(DLAppServiceImpl.java:3412)
Also if I restart both system error persist.
I can create external repository again... but after some login logout I have the same problem again!
Thanks in advance!

Related

How to get a specific folder in alfresco from liferay

I'm using Liferay 6.2 and Alfresco community 5.0.
I've succeeded to integrate Alfresco at Liferay with a CMIS connection.
The inheritance rule is activated on my repository(company home), and I can't disable the inheritance on the sub folders (boss's order).
My Alfresco repository root (company home) is readable by every one, so the sub folders too.
each users have his folder in the repository (folder's name = username)
My boss's wish:
when a user is authenticated in Liferay, he should only see his own
folder, not all the repository.
And I'm lost.
Where can I modify, or create, a CMIS query in order to get the user's folder, and not all the repository...
It is possible to do that or do I have write my own portlet ?
Maybe I can do that in Alfresco ?
Alfresco automatically creates a user folder with private access for each user, you can find the folders in //app:company_home/app:user_homes
You should write a cmis path query that navigates to this user folder, it should look like this (example is listing files in directory for user "testuser"):
SELECT * FROM cmis:folder WHERE
CONTAINS('PATH:"//app:company_home/app:user_homes/cm:testuser/*"')
More in : https://forums.alfresco.com/forum/developer-discussions/alfresco-api/how-get-user-home-space-id-06272011-0628

Why does liferay published unedited specific journal article?

I am using liferay 6.1. I have many journal articles(Web content). When I publish to remote server. Liferay publish one specific article despite no changes in it. I have written Listener on journal article.
It is liferay problem. If we place journal article on web content display portlet and place on particular page e.g. Home page. If we publish on remote server with selecting the home page It will publish that webcontent as well despite no change in it.
The webcontent will not publish if you select any other page and publish If you not updated that webcontent.

Connecting Alfresco and Liferay with a specified user

I am trying to connect Alfresco (4.2) with Liferay (6.1.1). Everything works without problems if I use Documents and Media Portlet.
My problem is I need to use a specified user to connect to Alfresco and not the logged user.
I have tried to add some properties on portal-ext.properties, like dl.store.cmis.credentials.username, and dl.store.cmis.credentials.password, but without luck.
Can someone help me?

Integrating Alfresco and Liferay to show only one folder

I'm trying to integrate Alfresco and Liferay. I have configured CMIS integration following this guide. It works without problem.
But now, I want to configure that repository to show only one folder. I can set a start folder on "Document and Media Portlet", but if I try to add a folder of the Alfresco repository, it says that there are not folders.
Here is a screenshot of "Document and Media portlet" integrated with an Alfresco repository
And this is when I try to select one folder of the repository
Any help will be appreciated.
Finally I figured out where was the problem.
Alfresco's Solr indexes were corrupted. My CMIS queries were not working, so search documents within a folder by using CMIS, did not retuned results.
I have removed Solr Indexes, restarted Alfresco, and now Liferay is working without problem

Find Source for Portlet

To learn more how to implement portlets in Liferay, I want to view the src of existing portlets, e.g. the "Documents and Media" Portlet. Where can I find this src code? I downloaded the src of Liferay but I cant find the relevant files.
The way to learn more about building portlets in Liferay is probably to check out the Liferay Plugins repository, rather than Liferay Portal source.
Some Liferay portlets come OOTB in Liferay Portal itself -- that's what #ArtemKhojoyan is mentioning above. However, as these portlets are pretty thoroughly integrated with the portal itself, they may not be super helpful in figuring out how to make a plugin to deploy on Liferay.
To check out some more standalone portlets, download the Plugins repo -- either by cloning the source on github with https://github.com/liferay/liferay-plugins.git, or downloading a plugins SDK at http://www.liferay.com/downloads/liferay-portal/additional-files -- and open up the portlets/ folder -- that's probably going to be more helpful in showing you hot-deployable portlets that will be more similar to something you'd make yourself.
For Liferay 6.2.0:
Java: \liferay-portal-src-6.2.0-ce-ga1\portal-impl\src
JSP: \liferay-portal-src-6.2.0-ce-ga1\portal-web\docroot\html\portlet
Your required case:
Java: \liferay-portal-src-6.2.0-ce-ga1\portal-impl\src\com\liferay\portlet\documentlibrary
JSP: \liferay-portal-src-6.2.0-ce-ga1\portal-web\docroot\html\portlet\document_library

Resources