Setting up the development environment on liferay latest trunk

Goals :

1. To setup the dev environment of the liferay code on Netbeans 6.1 and Tomcat in debug mode

This is to understand the liferay code for the project websynergy and the flow of the code. 


 

 Pre-requisites :

1. Install Netbeans 6.1 , ant 1.7, Tomcat 6.x, and svn

 


 

Steps : 

1. checkout the latest Liferay trunk with the help of the following command "svn co https://lportal.svn.sourceforge.net/svnroot/lportal/portal/trunk liferaytrunk"

2. cd to liferaytrunk

3. run "ant"

4. After this, cd to liferaytrunk copy "app.server.properties" to "app.server.siddesh.properties". Note : siddesh is the login name for my windows xp machine. So it will vary for you depending on your login name

5. Remove everything from "app.server.siddesh.properties" and add the following. (Note : These properties might change for you depending on where you have installed the apache-tomcat-6.0.16

    app.server.parent.dir=${project.dir}/../

    app.server.tomcat.version=6.0
    app.server.tomcat.dir=${app.server.parent.dir}/apache-tomcat-6.0.16
    app.server.tomcat.classes.global.dir=${app.server.tomcat.dir}/lib
    app.server.tomcat.lib.endorsed.dir=${app.server.tomcat.dir}/lib/ext
    app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
    app.server.tomcat.lib.support.dir=${app.server.tomcat.dir}/lib/ext
    app.server.tomcat.support.dir=${app.server.tomcat.dir}/lib/ext
    app.server.tomcat.zip.name=liferay-portal-tomcat-6.0-${downloads.version}.zip
    app.server.tomcat.classes.portal.dir=${app.server.tomcat.classes.global.dir}
    app.server.tomcat.lib.portal.dir=${app.server.tomcat.lib.global.dir

6. If one starts the tomcat using startup.bat(in windows) or startup.sh in Solaris, it gives the following exception

Exception in thread "http-8080-Processor25" java.lang.OutOfMemoryError: PermGen space
Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "http-8080-Processor24" java.lang.OutOfMemoryError: PermGen space
Exception in thread "QuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: PermGen space
Exception in thread "QuartzScheduler_QuartzScheduler-NON_CLUSTERED_MisfireHandler" java.lang.OutOfMemoryError: PermGen space

7. To solve this, add the following line in catalina.bat(on windows) or catalina.sh(on solaris) :

JAVA_OPTS="$JAVA_OPTS "-Xmx1024m" "-Xms1024m" "-XX:MaxPermSize=512m""


8. Setting Tomcat to listen in debug mode : (Example of startup.bat is shown)

    cd to apache-tomcat-6.0.16\\bin directory

    Add the following lines in startup.bat script (set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket)

Add the following line just before :end (call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%)

9. Start the netbeans 6.1 and import the liferaytrunk project into the netbeans

10. click on run -> attach debugger

Debugger : JPDA Debugger

Connector : Socket Attach

Host : give localhost or the hostname

Port : 8000

11. Access the liferay http://localhost:8080 This will invoke the debugger in the netbeans 6.1 . One can add break points and checkout the flow of the code.

 

Comments:

Building liferay on Glassfish V2
http://blogs.sun.com/vihang/entry/building_and_installing_liferay_source

Posted by Ajit on May 27, 2008 at 09:06 AM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

siddeshk123

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today