cancel
Showing results for 
Search instead for 
Did you mean: 

Share Portlet In Liferay

yellowpoint
Champ in-the-making
Champ in-the-making
Hi,
Im trying to get the example Share portlet to work in Liferay but its not happening. I've followed this blog post on how to do it. I am using Alfresco CE 3.3G and Liferay 6.0.3 (in separate tomcat instances running at different ports).

I followed all the steps outlined in that post exactly except for the one about remote authenticator(step 6). For some reason, Share doesn't pick up webscript-framework-config-custom.xml so instead I put the remote authenticator definition in share-config-custom.xml:


<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>

When I add the portlet in liferay, I get this in the log and there are no exceptions:
DEBUG [web.portlet.ProxyPortlet] Processing portal render request http://localhost:9090//share (scriptUrl=/share/service/sample/cmis/repo)

However, there's nothing displayed in the portlet except for:
The requested resource (/share/service/sample/cmis/repo) is not available

Has anybody got this to work with Liferay 6.0.3? Thanks.
11 REPLIES 11

yellowpoint
Champ in-the-making
Champ in-the-making

mikeh
Star Contributor
Star Contributor
Two points:
1 - Yes, you're correct that the config now has to go in share-config-custom.xml. Luis' blog post is referring to v3.2 rather than v3.3
2 - We've not tested Liferay 6 internally yet, only 5.2.3. I'd be very interested to hear whether it works however!

If you grab the v3.4 dev and drop Share in, you should see two new portlets as well as the CMIS one. I'll be writing a blog post on v3.3 specifics very soon.

Thanks,
Mike

P.S. All of those JIRA issues should be fixed on v3.4 dev

yellowpoint
Champ in-the-making
Champ in-the-making
I downloaded and installed a nightly build from http://dev.alfresco.com/downloads/nightly/dist/ called alfresco-community-3.4.0dev-installer-win.exe (21-Jul-2010 22:48)
but its missing the share.war and a couple of batch files…
I guess its incomplete so will download the source from SVN and build it.
Will post my findings here later…

yellowpoint
Champ in-the-making
Champ in-the-making
I've tried it with Alfresco_3.4.0dev and Liferay_6.0.3. "My Document Libraries" portlet and "Repository Library" portlet are working fine. But, the "CMIS Folder Browser" portlet still isnt working. I still get this message inside the portlet: "The requested resource (/share/service/sample/cmis/repo) is not available".

Also, with this version of Alfresco, I no longer get "Permission Denied" javascript errors when I point a Liferay IFrame portlet to Explorer or Share…

mikeh
Star Contributor
Star Contributor
Thanks for the feedback. I'll investigate what the current state of the CMIS portlet is.

Thanks,
Mike

zomurn
Champ in-the-making
Champ in-the-making
yellowpoint > I'am currently doing the same. But it seems to be logical your error simply because the REST service /share/service/sample/cmis/repo doesn't exist. This webscript has been put into alfresco.war. So The idea may be to call this webscript from a webscript developped into share.war and then reference this latter into portlet.xml, what do you think about this solution ?

william
Champ in-the-making
Champ in-the-making
yellowpoint > I'am currently doing the same. But it seems to be logical your error simply because the REST service /share/service/sample/cmis/repo doesn't exist. This webscript has been put into alfresco.war. So The idea may be to call this webscript from a webscript developped into share.war and then reference this latter into portlet.xml, what do you think about this solution ?
Hi Zomurn,

I've the same problem as yellowpoint before, when i check my files i found no such a directory as service/share/service/sample/cmis/repo, so i created such directory and it's empty now, my question is what portlet or plugin i need to upload data into that folder.

thx,
William

spycos
Champ in-the-making
Champ in-the-making
Hi all,

I'm trying to deploy share as liferay portlets and got a couüple of issues…

Made all changes according to info available on forums but still have problems.

The odd thing is that share is correctly installed inside liferay and I can see 3 portlet avaliable and successfully registered and when I add one of them as example for a public page if I#m not logged in … I see the share popup saying you are not logged in on portal.

So far so good… problem happens when loggin I performed.. .portlet throws an exception… and I can see some traces and the problem is with USER LOADING (i can see a trace to load user … and another unable to create user… also tested creating manually user on alfresco… same happens-… and I know that account on alfresco must match liferay user screen name…)

Note that my alfresco repository is installed on another machine / tomcat from where I have liferay running and share portlets as clients.

Apart from that … if I access to share directly … I can logged in …without problems…

With this… The problem must be on SSO on liferay… but it is working…. I've made a fast debbugging and problem seems to be with credientials vault or something like that… I got into the point where webscript is called  ALFRESCO_ENDPOINT + /framework/… (user) ….   (I don't have the code now…) and if I introduce the complete url into browser url… all is fine… and rest url is returning… but from inside the code …
It returns an 401 error…  (which means Unauthorized)

Anyone got into this same issue? …Alfresco is 3.4a but my share was picked up from trunk …so at moment is 3.4b i think…


Differnce between share direct access and from inside liferay as portlets is that the first explicity requires user credentials tro be entered… autenticate method is called before load user method on the first but as portlets only load user is called….

Thanks in advance…
Regards

dblessing
Champ in-the-making
Champ in-the-making
Spycos: I am having the exact same problem that you describe and cannot seem to find any help.  I have the portlets deployed but get the user exceptions upon logging in.  I have been working on this one problem for weeks so please share if you have found a solution.  I appreciate the help.
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.