Liferay Learning (source debugging issues)

Source: Internet
Author: User

Environment Construction:

Liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip liferaytomcat Server

Liferay-ide-eclipse-windows-x64-2.2.4-ga5-201507230603.zip liferayide Development tools

Liferay-portal-sql-6.2-ce-ga4-20150416163831865.zip Liferay building a database statement

Liferay-portal-src-6.2-ce-ga4-20150416163831865.zip Liferay Source Package

Liferay-plugins-sdk-6.2.zip Liferay plug-in

Developed directly using the IDE provided by the official website, the JDK version is jdk1.7

Omit the environment construction process, (download the above package directly decompression can be done)


Import the source package into the development environment,

In the ant add Built.xml file, and for the compilation and deployment of the source code, the compilation and deployment after the launch of Tomcat (debug mode) Of course, you will encounter some problems when starting, the specific problem is as follows:

Compiling source code

Question One,

Please set the environment variable ant_opts to the recommended value of

"-xmx1024m-xx:maxpermsize=512m".

Workaround

1) in the source code of the Liferay project Build.xml right click on the-->run as-->external Tool configurations

2) In the Tab tab, locate environment, click New, enter ant_opts in name, enter-xmx1024m-xx:maxpermsize=512m in value, and click Apply.

Question Two,

Tomcat is not a installed in e:/liferay/6.2/bundles/tomcat-7.0.42. If you already has Tomcat

installed, make sure the ' ${app.server.tomcat.dir} ' points to your

Tomcat installation. If you wish to automatically install Tomcat into

Workaround

1, open the Liferay source directory, find the App.server.properties file.

2, copy some files, rename the file to App.server.{username}.properties, where {username} is the account name of the current system.

3. Open this file to find app.server.parent.dir=${project.dir}/. /bundles. Will be behind the ${project.dir}/. /bundles Replace the path of the tomcat with the downloaded binding liferay, such as my E:/CODE/LIFERAY6.1/LIFERAY-PORTAL-6.1.1-CE-GA2, the modified address is: App.server.parent.dir=e:/code/liferay6.1/liferay-portal-6.1.1-ce-ga2. Note: The address copied from the Address bar is a forward slash, please change it to a backslash.

4, now the Eclipse ant panel inside click, add Buildfiles, the portal source inside the Build.xml file added to the ant panel inside.

5. Open this build file, click Compile First, then click Deploy to deploy the source code to tomcat.

Question three,

Always prompt for thread exception issues such as Threadpoolexecutor$worker.run ()

Solution:

Open the Parameters panel and search debug to find "Suspend execution on uncaught exceptions" remove the front tick.

Liferay Learning (source debugging issues)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.