This time this is not the Q&D, but the real one.

How to roll out new theme, portlet, etc. to your Liferay Portal under Glassfish ?

Well, just use the embeded features:

  1. Hot deployment from dir
  2. Hot deployment from the Liferay Admin Interface
But before using these features, some configuration work has to be done:
  1. Open the in ${app.server.dir}/domain/domain1/lib/classes
  2. Check for the autodeploy value and enter correct one
  3. Do the same in the autodeploy page of LF portal administration (need to be sign in as an administrator of the portal)
    Uncheck (so put to FALSE) unpack war
    For information you can enter relative or direct path to the autodeploy folder located in ${app.server.dir}/domain/domain1/autodeploy
  4. Restart Glassfish in order to have your new values taken into account.
And now you should be able to roll out your war files directly using /home/liferay/deploy (create it if is does not exist) or via the AutoDeploy form.

Nota: once deployed you should see you war file as a Web Application when using Glassfish admini GUI.

4 commentaires

  1. Walter // 11:35 PM  

    Ok, I've noticed that I when I start GF, I get a RuntimeException: Server not supported error that comes from the Auto(LayoutTemplate|Portlet|Template)Deployer. This causes hot deployment not to work under GF, so either I missed a step, or this is just not possible. I've tracked the code that generates this back to the AutoPortletDeployer class -- this makes a call to getServerId in the ServerDetector class, which throws an error and causes the auto deploy classes to bailout before being fully configured. It doesn't look like any of the Sun-based servers are detected in the gerServerId function and all of the hot deploy functions would be disabled for these servers. Any thoughts? Was something else modified? Thanks -- Walter.

  2. Walter // 11:48 PM  
    This comment has been removed by a blog administrator.
  3. Walter // 12:00 AM  

    Nevermind... user error on the previous post... But, new problem... When I try to deploy the sample-jsf-sun-portlet-4.1.2.war file from the Liferay downloads site, I get a ClassNotFoundException: com.liferay.portal.kernel.servlet.PortletContextListener error. I've been experimenting with the location of portal-kernel.jar, but no luck. I have portal-kernel.jar in domain1/lib/portal-kernel and portlet.jar under domain1/lib... Any ideas? Anybody? Thanks -- Walter.

  4. Stef // 3:00 PM  

    Well, I discovered that you have to pub both jar files in /glassfish/domains/domain1/lib
    Do not put them in other subfolders except in some v1 release where you have to put one or both in some subfolder to make sure glassfish is provinding requested classes properly to your Liferay portal.
    I also noticed that some times it is important to have the xerces*.jar (provided in Liferay) in /glassfish/domains/domain1/lib to have some jsf portlet deployed.