cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco as portlet application

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

I don't know where to post this message, so I apologize in advance if I post it in the wrong place.

I was wondering if there is any stand-alone release of Alfresco made with portlets. In other words, can I get a release of Alfresco as a portlet application (a war file with portlets that can be invoked from within the portal)?? I've seen that there is a release for [size=75]Tomcat+Liferay+Alfresco[/size], but my intention was to use Jetspeed instead of Liferay. Is this possible? Does anybody know?

My first thought was to use an "IFrame Portlet" pointing to Alfresco webapp… the simplest but most inefficient (and most inelegant) solution from my point of view. In spite of its simplicity, I think this solution needs from little Alfresco customization anyway since, for example, authentication relies on portal side…

I realized that it wasn't the best solution and so I thought Alfresco webapp could be turned into a portlet application. It could be nice indeed, but I think it requires a tremendous effort (even larger for just one person) and it would be difficult for me to get an acceptable result in a short time.

So, does anybody know where can I find this release of Alfresco (if exists)? Or how can I turn Alfresco into a portlet application easily??
Can I find some screenshots of Alfresco running over Liferay??

Any help appreciated.

Thanks in advance,
Enrique
9 REPLIES 9

kevinr
Star Contributor
Star Contributor
In the 1.3 release of Alfresco we fixed the JSR-168 portal integration to be generic to any JSR-168 container (previously only JBoss Portal worked 100% correctly). So now it supports and run nicely within Liferay also. In theory it should work in Jetspeed as well now. I suggest you download the WAR for Alfresco 1.3 and try working out how to deploy it in Jetspeed. You will need to create the appropriate portal deployment XML files (both the JBoss + Liferay Alfresco bunldes have examples of those) which are specific to Jetspeed, but other than that in theory it should work.

You are correct that it would be best if Alfresco had native JSR-168 portlets, which it would be great if the community were interested in developing - as currently the entire Alfresco web-client is deployed as a single large portlet which is not ideal.

Thanks,

Kevin

doblek
Champ in-the-making
Champ in-the-making
Ok, I'll try as you suggest me 😃
Thanks for your help.

Regards,
Enrique

doblek
Champ in-the-making
Champ in-the-making
Hi everyone!

I've procceded as Kevin suggest me but I found an error I'm not able to fix =/

I've modified the war file that it's included in alfresco-comunity-war-1.3.0.zip following somehow the instructions given in the wiki for deploying Alfresco over an existing copy of Liferay.

I've followed this steps:
1) unpack alfresco.war in temporary folder (C:\alfresco_temp)

2) delete the file portlet-api-lib.jar (which is at C:\alfresco_temp\WEB-INF\lib)

3) modify web.xml (I used the web.xml that comes with Liferay+Alfresco)
    - check out if [size=75]WEB-INF/faces-config.xml[/size] is the first value for [size=75]CONFIG_FILES[/size] context parameter
    - disable listener [size=75]com.liferay.portal.shared.servlet.PortletContextListener[/size]
    - disable servlet [size=75]com.liferay.portal.shared.servlet.PortletServlet[/size]
    - disable servlet-mapping associated with this servlet
    - change [size=75]liferay-portlet.tld[/size] for [size=75]portlet.tld[/size]
    [size=75]
Note: I've disabled this features because I thought they refer to Liferay libraries and I'm using Jetspeed 2[/size]

4) modify faces-config.xml (I used the one that comes with Liferay+Alfresco)
           Instead of
<faces-context-factory>com.liferay.util.jsf.apache.myfaces.context.MyFacesContextFactoryImpl</faces-context-factory>
           I use
<faces-context-factory>org.apache.myfaces.context.FacesContextFactoryImpl</faces-context-factory>
since I'm not sure I have the first one, and the second one lives in C:\alfresco_temp\WEB-INF\lib\myfaces-impl.jar

5) copy the portlet.xml that comes with the Liferay+alfresco

6) copy the faces_config.xml, web.xml and portlet.xml under C:\alfresco_temp\WEB-INF\

7) create the new alfresco.war

😎 deploy this new alfresco.war under the deployment folder of the portal (in my case, $TOMCAT_HOME\webapps\jetspeed\WEB-INF\deploy)

However, though jetspeed recognizes this file when it tries to deploy it, the following errors appears:
26-jul-2006 9:09:35 org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo alfresco.war de la aplicaci?n web
26-jul-2006 9:10:01 net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
26-jul-2006 9:10:02 net.sf.joott.uno.UnoConnection connect
[size=75]GRAVE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused: connect[/size]
26-jul-2006 9:10:02 net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
26-jul-2006 9:10:03 net.sf.joott.uno.UnoConnection connect
GRAVE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused: connect
26-jul-2006 9:10:41 org.apache.catalina.core.StandardContext start
[size=75]GRAVE: Error listenerStart[/size]
26-jul-2006 9:10:41 org.apache.catalina.core.StandardContext start
[size=75]GRAVE: Fall? en arranque del Contexto [/alfresco] debido a errores previos[/size]
26-jul-2006 9:11:01 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Acceso ilegal: esta instancia de aplicaci?n web ya ha sido parada.  Could not load org.quartz.StatefulJob.  La eventual traza de pila que sigue ha sido motivada por un error lanzado con motivos de depuraci?n as? como para intentar terminar el hilo que motiv? el acceso ilegal y no tiene impacto funcional.
java.lang.IllegalStateException
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:164)
   at org.quartz.JobDetail.class$(JobDetail.java:59)
   at org.quartz.JobDetail.isStateful(JobDetail.java:396)
   at org.quartz.simpl.RAMJobStore.triggerFired(RAMJobStore.java:1207)
   at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:307)

and
2006-07-26 09:10:32,109 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jetspeed].[jsp] - Servlet.service() para servlet jsp lanz? excepci?n
java.lang.OutOfMemoryError: Java heap space
2006-07-26 09:41:13,859 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG org.apache.jetspeed.portalsite.impl.PortalSiteSessionContextImpl - Session unbound event: clear page manager listener and session context state

It complaints about
ERROR [util.transaction.SpringAware.UserTransaction] Transaction didn't commit
java.lang.OutOfMemoryError: Java heap space

ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
at alfresco.repo.importer.bootstrap


Any help appreciated.

Thanks in advance,
Enrique

PS: I can post the config files I used if needed
PS2: Sorry for my bad English

kevinr
Star Contributor
Star Contributor
We have not tried JetSpeed ourselves so i'm only guessing here:

You may not need step 4 - it depends, does JetSpeed have a JSF bridge?

>GRAVE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused: connect
This is because you don't have openoffice server running (for document transformations) - it is not a problem.

>java.lang.OutOfMemoryError: Java heap space
What is the default JVM memory size for Jetspeed? I suggest you set it to at least 128MB and turn off any log4j debugging for Spring/Hibernate (if you have any).

Thanks,

Kevin

doblek
Champ in-the-making
Champ in-the-making
Hi Kevin,

We have not tried JetSpeed ourselves so i'm only guessing here:

Well, maybe your guesses point me to the right direction… 😃 I'm a little bit stuck =/ So I'm very thankful to you for your interest.

You may not need step 4 - it depends, does JetSpeed have a JSF bridge?
I guess it does… see this page. I took a look to the jsf sample application that comes out-of-the-box with Jetspeed2 when setting up descriptors… but I didn't get anything clear… =/
Then if there's a jsf bridge, what factory should I use??
As I can see from the logs, there is a problem initializing Listeners. Are these two issues related?? Should I "uncomment" those lines in the web.xml??


>GRAVE: connection failed: com.sun.star.connection.NoConnectException: java.net.ConnectException: Connection refused: connect
This is because you don't have openoffice server running (for document transformations) - it is not a problem.
Ok.

>java.lang.OutOfMemoryError: Java heap space
What is the default JVM memory size for Jetspeed? I suggest you set it to at least 128MB and turn off any log4j debugging for Spring/Hibernate (if you have any).
I can't remember very well right now… but i would say it is set to 65MB and there is a log4j logger for Spring. Until this moment, I haven't had problems with this issue… but I will try.

Thanks,
Enrique

kevinr
Star Contributor
Star Contributor
You may not need step 4 - it depends, does JetSpeed have a JSF bridge?
I guess it does… see this page. I took a look to the jsf sample application that comes out-of-the-box with Jetspeed2 when setting up descriptors… but I didn't get anything clear… =/
Then if there's a jsf bridge, what factory should I use??

I'm not sure - it sounds like the JSF sample app is the best thing to examine. Does it have a web.xml that starts up a JSF bridge? If so then copy what it does. You may not need any! The JBoss Portal JSF bridge did not require us to have any special lines in the web.xml, but Liferay was different.

As I can see from the logs, there is a problem initializing Listeners. Are these two issues related?? Should I "uncomment" those lines in the web.xml??

No, i think they are needed.

>java.lang.OutOfMemoryError: Java heap space
What is the default JVM memory size for Jetspeed? I suggest you set it to at least 128MB and turn off any log4j debugging for Spring/Hibernate (if you have any).
I can't remember very well right now… but i would say it is set to 65MB and there is a log4j logger for Spring. Until this moment, I haven't had problems with this issue… but I will try.
The Spring logger may only be an issue if it's set to DEBUG. 64MB is a bit low for a portal+alfresco.

Thanks,

Kevin

doblek
Champ in-the-making
Champ in-the-making
Hi,

I've been working around this thing, but with no luck… Tomcat becomes hung while (or inmediatly after) deployment.
I looked into web.xml from jsf-demo application, and Kevin was right: there is no factory definition in it. There are navigation rules, beans,… and all that stuff. But Alfresco has all these things split in different xml files, so I decided not to include de faces-config.xml (since this file only defines the factory). That not worked, so now I have an almost-empty faces-config.xml… and seems to work bit better…

In the web.xml I've modified also the class for the Alfresco Servlet to use
<servlet>
  <servlet-name>AlfrescoClient</servlet-name>
  <servlet-class>[size=109]org.apache.jetspeed.container.JetspeedContainerServlet[/size]</servlet-class>
    <init-param>
         <param-name>portlet-class</param-name>
         <param-value>org.alfresco.web.app.portlet.AlfrescoFacesPortlet</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
</servlet>

instead of
<servlet>
  <servlet-name>AlfrescoClient</servlet-name>
  <servlet-class>[size=109]com.liferay.portal.shared.servlet.PortletServlet[/size]</servlet-class>
    <init-param>
         <param-name>portlet-class</param-name>
         <param-value>org.alfresco.web.app.portlet.AlfrescoFacesPortlet</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
</servlet>

However, I think i keep going through some trouble because of the first listener… but I didn't find in liferay portal-ejb api any class called [size=75]PortletContextListener[/size] inside the package [size=75]com.liferay.portal.servlet[/size]. Does anyone know what is this listner for (so I can look for its equivalent in Jetspeed)?? I've found a PortletFacesContextImpl in the jsf-bridge library of J2 that maybe could work…

Thanks and regards,
Enrique

fthamura
Champ in-the-making
Champ in-the-making
I see the Alfresco integration is never happen, because you never integrate the login between Alfresco and Liferay/JBoss Portal

I think your integration right  now is useless..

but problem happen, we try to implement Liferay SSO using CAS, but Alfresco using another mechanism.

can help?

sebastien_marin
Champ in-the-making
Champ in-the-making
I see the Alfresco integration is never happen, because you never integrate the login between Alfresco and Liferay/JBoss Portal

I think your integration right  now is useless..

but problem happen, we try to implement Liferay SSO using CAS, but Alfresco using another mechanism.

can help?


Hello, i want to do the same thing with Liferay. Can anyone help us ?


Thank you.