cancel
Showing results for 
Search instead for 
Did you mean: 

3.4.b integrate with Liferay Portlets

dblessing
Champ in-the-making
Champ in-the-making
I cannot seem to get the Alfresco portlets to work in Liferay.  I am using Alfresco Community version 3.4.b and Liferay 6 (I have also tried Liferay 5.x with exact same results)

I have followed all kinds of instructions, but the latest one I was trying was here: http://wiki.alfresco.com/wiki/Doclib_Portlet
I am attempting this all on the same server running in one instance of Tomcat.

I says to add the endpoint configurations to share-config-custom.xml (I did exactly as shown in the wiki) and to add the authentication elements to alfresco-global.properties (the auth elements shown in that wiki page are slightly wrong, but I didn't type them like that).  I used:

authentication.chain=alfrescoNtlm1:alfrescoNtlm,external1:external
external.authentication.proxyUserName=

Liferay and Alfresco all start up fine, with no errors in the logs.  The portlets deploy successfully and are available to be added to Liferay pages.  I also know it's communicating with my Alfresco server, because if you add the portlets to the front page of Liferay and aren't logged in, it displays a splash page that says Please login to your portal, or something like that.  The error occurs when I login to Liferay.  The portlets all display "Porlet is unavailable at this time" and the logs show:
04:16:49,670 ERROR [jsp:154] org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository

I'm guessing that either my endpoints are correct, or I'm missing some little configuration.  My endpoints all reference localhost:8080 as that is where my Alfresco is deployed.

Can anyone offer me some help?  If you need more information or more from logs, please let me know.  It would be amazing to finally figure out what I'm doing wrong.
21 REPLIES 21

twohitsix
Champ in-the-making
Champ in-the-making
Try to follow the instruction from here:
http://wiki.alfresco.com/wiki/Portlets

Although not all the settings are correct for me, "My document library" portlet is working in Liferay 6.0.5 with Alfresco 3.4a.

The next thing I am trying to fix is the layout…  looks like all item on the page is 'centered' and it is not expected…  Smiley Surprisedops:

mikeh
Star Contributor
Star Contributor
The first wiki article is correct. Make sure you followed the Tomcat 6 instructions: http://wiki.alfresco.com/wiki/Install_Tomcat6

Thanks,
Mike

dblessing
Champ in-the-making
Champ in-the-making
One thing I've never understood from that Tomcat wiki is it's reference to shared/lib.  What files is it expecting in that folder since it mentions it in the shared.loader?  That may be the one thing I'm missing.  Otherwise, I believe I've made necessary adjustments for that.  Any other ideas?  Thanks for the help.

mikeh
Star Contributor
Star Contributor
It's used to extend Share with jar files.

Thanks,
Mike

dblessing
Champ in-the-making
Champ in-the-making
That's great.  As long as I know nothing is supposed to go there initially.  Makes sense.  Thank you both for your input.

dblessing
Champ in-the-making
Champ in-the-making
I apologize for not being able to figure this out, but I'm hoping someone can provide more guidance.  I have literally exhausted all efforts trying to integrate Liferay 5.2.3 and Alfresco.  I have tried Alfresco Community 3.4.a, 3.4.b, and Enterprise 3.3.3.  All have produced the same problem for me.  I can deploy the portlets and can get both Alfresco and Liferay to work separately.  When I add the portlets, I always get the same "Cannot retrieve user from the user factory."  I am almost positive it has to be a config problem in share-config-custom.xml.
(Here it is, just to make sure I provide the info needed to help)
<alfresco-config>
  <config evaluator="string-compare" condition="Remote">
    <remote>
      <endpoint>
        <id>alfresco-noauth</id>
        <name>Alfresco - unauthenticated access</name>
        <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
        <connector-id>alfresco</connector-id>
        <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
        <identity>none</identity>
      </endpoint>
      <endpoint>
        <id>alfresco-feed</id>
        <name>Alfresco Feed</name>
        <description>Alfresco Feed - supports basic HTTP authentication</description>
        <connector-id>http</connector-id>
        <endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
        <basic-auth>true</basic-auth>
        <identity>user</identity>
      </endpoint>
      <connector>
        <id>alfrescoCookie</id>
        <name>Alfresco Connector</name>
        <description>Connects to an Alfresco instance using cookie-based authentication</description>
        <class>org.springframework.extensions.webscripts.connector.AlfrescoConnector</class>
      </connector>
      <endpoint>
        <id>alfresco</id>
        <name>Alfresco - user access</name>
        <description>Access to Alfresco Repository WebScripts that require user authentication</description>
        <connector-id>alfrescoCookie</connector-id>
        <endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
        <identity>user</identity>
        <external-auth>true</external-auth>
      </endpoint>
    </remote>
  </config>
</alfresco-config>

I have added the connectors to share-config-custom.xml as outlined in the wiki I posted originally.  Is there any other place that I need to make changes?  Could I have missed anything in the initial setup of Alfresco or Liferay?

I have added a user to both Liferay and Alfresco.  I made the screen name in Liferay identical to the username in Alfresco.

I appreciate the help.

flefoll
Champ in-the-making
Champ in-the-making
Hi,

I got the very same issue than above (with added section in alfresco-global.properties for the alfresco instance and share-config-custom.xml for the liferay/share instance).

Using Alfresco 3.4.b and Liferay 6.0.5

Regards,

Francois

mikeh
Star Contributor
Star Contributor
By default, Liferay's Tomcat instance isn't configured to read Tomcat/shared/classes and Tomcat/shared/lib. Please see the notes here: http://wiki.alfresco.com/wiki/Install_Tomcat6

Thanks,
Mike

dblessing
Champ in-the-making
Champ in-the-making
I have made those Adjustments and can confirm that Liferay is readIng the alfresco-global.properties file and share-config-custom.xml because when I once had a malformed xml file it threw errors on startup.  It is not allowing users to be retrieved from portlets in Liferay.  If it is throwing parsing errors when malformed, that would mean that it is in fact reading the file, correct?

To add, my database settings would not be set correctly if Tomcat wasn't reading my alfresco-global.properties file…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.