VC1
VC1

Reputation: 1686

Liferay IDE portlet changes not synchronized on the server

Platform

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:

Has anyone see this behavior?

Upvotes: 0

Views: 634

Answers (2)

Chris Maggiulli
Chris Maggiulli

Reputation: 3824

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.

Although these initially steps are not explicitly necessary - I strongly recommend them for consistency

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.

Upvotes: 1

VC1
VC1

Reputation: 1686

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.

Upvotes: 0

Related Questions