3 Replies Latest reply on Dec 10, 2006 6:07 PM by Bill Joy

    Deploy failure on Liferay

    Philip Kerrigan Newbie

      I have been trying to install kosmos 0.2RC2 on Liferay 4.1.3 and Tomcat 5.20 on XP without success and have reached a brick wall despite reading all the manuals I can find. Much of which does not correspond to the files and directories I have.

      I have tried copying the liferay portal and server directories to tomcat webapps, but nothing happened, and the link in the reference to liferay hot deploy is invalid.

      I tried installing the generic .war download, and have had to edit the deploy files but have been able to build the .war file to install. however on deploy I get the following error:
      [mkdir] Created dir: C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp
      [unzip] Expanding: C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\kosmos-portlet.war into C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp
      [copy] Copying 2 files to C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp\WEB-INF
      [copy] Copying 1 file to C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp\WEB-INF\tld
      [delete] Deleting 1 files from C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp\WEB-INF\lib
      [copy] Copying 2 files to C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp\WEB-INF\lib
      [replace] Replaced 16 occurrences in 16 files.
      [zip] Building zip: C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\conf\liferay-portal\kosmos-portlet.war
      [delete] Deleting directory C:\Downloads\liferay\kosmos-0.2.0RC2\portlet\temp


      [java] java.lang.NoClassDefFoundError: com/liferay/portal/tools/PortletDeployer
      [java] Exception in thread "main"
      [java] Java Result: 1

      Total time: 7 seconds

      I have been unable to discover where PortletDeployer is meant to be referenced.

      Any help would be greatly appreciated.


        • 1. Re: Deploy failure on Liferay
          Bill Joy Newbie

          Liferay provides code to implement deployment via Ant. The guts of that code is in the file portlet-deployer.xml. I don't know if it is available in the downloads (I recall it wasn't when I first encountered Liferay), however I have found a copy of it here:


          • 2. Re: Deploy failure on Liferay
            Philip Kerrigan Newbie

            Thanks for the pointer bjoy, but that file is almost exactly the same as the deploy file provided with KOSMOS. The only difference is the optional flag
            which I added, but it makes no difference.

            I still get the error
            [java] java.lang.NoClassDefFoundError: com/liferay/portal/tools/PortletDeployer

            I am deploying on Windows XP, with Liferay 4.1.3 anf Tomcat 5.17 (I had to downgrade because of a Tomcat problem with context loading) and JVM 1.5.

            At a guess I would say my classpath is not set correctly, although the deployer may have changed. Since I don't know where it should be found I don't know what to change.

            Any idea where to look next?

            • 3. Re: Deploy failure on Liferay
              Bill Joy Newbie

              The Kosmos deploy-portlet-liferay-portal.xml file pretty much just delegates to the Liferay file that I pointed you too: portlet-deployer.xml.

              I already had a working deployer (written in Java with the logic copied from portlet-deployer.xml) before I decided to include Kosmos to the portal. So I cannot help you with the process of troubleshooting either of the two Ant scripts.

              The Liferay script is explict where it gets the jars, the bulk of which come from the common/lib/ext directory plus also common/lib/servlet-api.jar. My deployer also adds the liferay/WEB-INF/lib directory jar files to the classpath but I don't recall why.

              I am using Liferay Professional 4.0 as it came bundled with Tomcat.