0
votes

Platform

  • Liferay 6.2 EE Tomcat bundle deployed locally
  • Liferay 1DE - various version in the past 1 year
  • Liferay 6.2 EE plugins SDK
  • JDK 6 or 7
  • Mac OSX or Windows

Problem

We run into an issue intermittently with the Liferay IDE where a portlet java class changes are do show up the Tomcat server.

The setup is as follows:

  • A portlet is deployed on the server and is also configured to publish and synchronize on the local server (by drag and drop).
  • Any changes saved to any of the java class result in a expected publish to the server automatically without a need to do a ant deploy/ Liferay -> SDK -> deploy.
  • These changes can be seen in the browser after the publish
  • Intermittently, this automatic publish sync of the java classes does not work and the changes can't be seen in the browser.
  • Stopping and starting the server seem to have no effect.

Has anyone see this behavior?

2
Hi, can you explain the down vote on the question and the answer so I can improve whatever is missing. I would appreciate the feedback. This exact problem happened to 3-4 of my team members and the resolution was to follow the steps below. Rather than create an article just for my team, I documented it on SO, in case it helps other people.VC1

2 Answers

1
votes

I am working with a similar platform

  • Liferay 6.2 EE Tomcat bundle
  • Liferay Developer Studio 2.2.2
  • Liferay 6.2 SDK
  • JDK 7
  • Windows 10

To "synchronize" the changes in your IDE with your local server is about the way in which you deploy your portlet.

The first steps to clean your local environment

  1. Stop the local server
  2. Right click the server and clean
  3. Empty your webapps folder leaving only root
  4. Empty your temp folder
  5. Remove all files and directories from tomcat-X.x.x/work/Catalina/localhost except _

Next open your local server settings by double clicking on your local server instance. In the top right corner you should see a publishing fold. Click to expand and select the following options

  • Automatically publish when resources change
  • Update context path

Under the Liferay Settings fold (bottom left) you should have the following setting selected

  • Development (portal-developer.properties)

Enabling Developer Mode turns off certain caching options that default to true when operating in standard mode. Despite the official documentation it does not eliminate the need "to redeploy to see your portal modifications".

Instead of direct deploying from ANT, right click on your server -> add -> then select your desired portlet

This creates a directory in webapps with your portlet similar to ANT direct deploy - this is the only way automatic publishing will work.

0
votes

The problem above happened to a few of my team members local Liferay environments.

I have been able to work around this by following the steps below:

  • Undeploy the portlet by removing the portlet from the Tomcat home/webapps/ folder
  • Stop the Tomcat server Liferay IDE
  • Cleanup the temp folder under Tomcat home/tmp/ folder related the portlet in question
  • Start the tomcat server via the Liferay IDE
  • Deploy the portlet to the Tomcat server

The publish sync process seems to start to work after these steps.

I am not sure if there is a better solution.

Hope this helps someone.