Developer's Technical Manual

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.



  • This effort was mainly started singlehandedly as its own page project by User:Fredtsang. Since then there is a another printed manual done by Mario Calderon committed to the SourceForge Downloads/Documentation section - Red1 22:03, 26 October 2008 (EDT)
  • Those who wish to finish and upkeep this are welcome.

Installing Linux Mandrake 10.1

You will need 4 Installation CDs.

Insert Installation CD 1 and reboot the PC.

Press enter to install.

To choose language to use: Select Europe – English (British).

Accept the License Agreement and press Next.

Select Install when prompted to choose between Install and Upgrade.

      Keyboard selection: US keyboard 
      Security level: Standard
      Security Admin: leave it blank

DrakX Partitioning

Select Erase entire disk and press Next

When you get a message that installation media have been found (CDs 1-4), leave all selected and press OK.

Package Group selection

Make sure you have the following options selected. Press Next when done.

  • Workstation:
    • Office Workstation
    • Multimedia Workstation
    • Internet Workstation
    • Network Computer (Client)
    • Configuration
    • Console Tools
    • LSB
  • Server:
    • Database
    • Network Computer Server
  • Graphical Env:
    • KDE Workstation
    • GNOME Workstation

Install Servers: Select Yes and press Next

After some time, you will be prompted to insert CD 2, then CD 3 and finally CD 4.

Post Configuration

Set root password: *****

Enter a user (enter your name and password: ******)

Accept user and press Next

Automatically log on one user : do NOT select this feature and press Next.

Install bootloader: Select First sector of drive (MBR)

System Configuration Country/Region: Select Other Countries – Mauritius

Timezone: Select Asia – Muscat and press Next

Select Hardware clock set to GMT

Graphical Interface:

Graphic Card – RIVA TNT2
Monitor – Vendor (ViewSonic E90f+)
Resolution (1024x768)
16 million colors (24 bits)

Press OK when done.

Automatic start of graphical interface Xorg at reboot: Select Yes and press Next

Network/LAN: Select ADSL Connection

Connect to the Internet: Select Manual TCP/IP Configuration

IP Address: (the last number will vary)
Netmask: (same for all PCs)

Select Network Hotplugging and press Next

Host name:
DNS Server 1:
Zeroconf Host name: leave it blank

Start connection at reboot: Select Yes

Press Finish

Install updates: Select No

Remove CD and press Reboot.

Login with your username and password and select GNOME as session type.

Setting up Java Web Development Tools


Create folder devtools under home/user directory. From the Terminal, type the commands below.
su (login as root)
cd /home/user (go to /home/user directory)
mkdir devtools (create directory devtools)
chown -R user:user /devtools (to give permissions to user)

Java 1_5_0_04


From start menu go to Internet – File Transfer – Smb4k

Double-click on the Smb4k icon on the right of the taskbar.

File:2 1 1.jpg

Go to Redhat and click on install

Then double-click on //REDHAT/install/ in the upper right of the window.

Go to Previous Data on 120 - linux – Development – Java

Copy the jdk-1_5_0_04-linux-i586.bin file and paste it in /home/user/devtools directory.

Then type the commands below to extract the files to the /home/user/devtools directory.




Enter vi /home/user/.bash_profile
Or do it using GUI ( Edit Preferences and enable show hidden files to view .bash_profile)
Add the following lines:
export JAVA_HOME
Logout and re login.

Running Application on Terminal:

java or javac
If installation was not done properly, an error message will be displayed else you will see a window similar to the one below.

File:2 1 2.jpg

Eclipse 3.1


Java Installation


Installing Eclipse 3.1

Go to REDHAT/install/Previous Data on 120/linux/Development/Eclipse and copy the eclipse-SDK-3.1-linux-gtk.tar.gz file to /home/user/devtools directory. Then type the commands below. Commands: cd /home/user/devtools/ untar eclipse-SDK-3.1-linux-gtk.tar.gz


Running Application:

Commands: cd /home/user/devtools/eclipse ./eclipse

Create your workspace in /home/user directory.

Ant 1.7.0


Installing Ant 1.7.0

From start menu go to Internet – File Transfer – Smb4k – posterita – Redhat – install – linux – Development – Ant

copy the apache-ant-1.7.0-bin.tar.gz file and paste it in /home/user/devtools.

Then type the commands below to extract the files to the /home/user/devtools directory.


cd /home/user/devtools/
tar xvzf apache-ant-1.7.0-bin.tar.gz


Enter vi /home/user/.bash_profile
Add the following lines:
export ANT_HOME
export PATH

Running Application:


Ignore the warning message displayed.

Jakarta Tomcat 5.5.17


Installing Jakarta Tomcat 5.5.17

From start menu go to Internet – File Transfer – Smb4k – posterita– Redhat – install – Previous Data on 120 - linux – Development – Tomcat

copy the file and paste it in /home/user/devtools.

Then type the commands below to extract the files to the /home/user/devtools directory.


cd /home/user/devtools/


No configurations needed.

Running Application:



Configuring Tomcat on Eclipse


Unzip Tomcat plugin ( under Eclipse plugins directory.

Open Eclipse.

Go to Window – Reset perspective. This will make “Tomcat” appear on the menu bar.

Go to Window – Preferences – Tomcat.

Select Tomcat Version (version 5.x).

Tomcat Home – browse the base directory of Tomcat:


Configuration File – browse for /home/user/devtools/apache-tomcat-5.5.20/conf/server.xml

Tomcat Sub-option: Tomcat Base

Tomcat Base - /home/jerome/devtools/apache-tomcat-5.5.20

Tomcat Sub-option: JVM Settings

JRE: jdk1.5.0_04 has automatically been detected.
Classpath – Click on the Jar/Zip button and browse for
Boot Classpath
Click on the Jar/Zip button and browse for

Tomcat Sub-option: Tomcat Manager App

ManagerApp url – add: http://localhost:8080/manager
ManagerApp username – add root
ManagerApp password – add ******
Click on add user to tomcat-users.xml

Click on OK to apply configuration settings.

SVN Plugin for Eclipse


From start menu go to Internet – File Transfer – Smb4k – posterita– Redhat – install – revious Data on 120 - linux – Development – Eclipse

copy the subversion plug-in folder and paste it in /home/user/devtools.

Open Eclipse. Open Help - Software Updates - Manage Configurations

Right-Click on Eclipse SDK and choose Add - Extension location. Choose the selection /home/jerome/devtools/subversion plug-in and press Ok. Eclipse will be restarted automatically.

Open Window - Open perspective - Other. Select SVN Repository Exploring.

Right-Click on the SVN Repository Panel and choose new - Repository Location.

Url: svn+ssh://

Enter user and password information and check save.

Firefox 2.0


Installing Firefox 2.0

From start menu go to Internet – File Transfer – Smb4k – posterita– Redhat – install – Previous Data on 120 - linux – Development – Firefox

copy the firefox- file and paste it in /home/user/devtools.

Then type the commands below to extract the files to the /home/user/devtools directory.


cd /home/user/devtools/
tar xvzf firefox-


From the GUI, right-click on the firefox- file and select Actions and then extract here.

From the file browser, click on the Firefox Installer icon to begin installation.

Click Forward to continue installing Firefox.

Aqua Studio 4.7


Installing Aqua Studio 4.7

From start menu go to Internet – File Transfer – Smb4k – posterita – Redhat – install - Previous Data on 120 – linux – Development – AdStudio

copy the ads-linux-x86-4.7.2.tar.gz file and paste it in /home/user/devtools.

Then type the commands below to extract the files to the /home/user/devtools directory.


cd /home/user/devtools/
tar xvzf ads-linux-x86-4.7.2.tar.gz


From the GUI, right-click on the ads-linux-x86-4.7.2.tar.gz file and select Actions and then extract here .

From the terminal, type the commands below. Commands:

cd /home/user/devtools/datastudio

The window below will be displayed. Click Yes to register a server.

File:2 8 1.jpg

Then fill in the fields as shown. Enter ***** as password.

File:2 8 2.jpg

Click OK and you will see the window below.

File:2 8 3.jpg

Click on Compiere and expand it to see all the tables available.

File:2 8 4.jpg

Customizing your desktop

To add a shortcut to your desktop, right-click on desktop and select Create Launcher.

Enter the name of the program you wish to create a shortcut for in the Create Launcher window and click on browse.

File:2 9 1.jpg

Browse the file system to select the folder where the executable file is found.

File:2 9 2.jpg

Click open. Then click on No Icon and browse to select the icon for the program.

File:2 9 3.jpg

When done, your desktop should look like this.

File:2 9 4.jpg

Configuring Eclipse for Compiere

Adding a CVS Repository Run Eclipse by clicking the Eclipse icon on your desktop.

Go to Window – Show View – Other – CVS – CVS Repositories and press OK as shown in the figure below.

The following window will be displayed. Fill the fields as shown (password is ******) and press Finish when done.

Click Yes when you see the window below.

Click Yes

Click OK

When the repository has been created you will get the window below.

To get a copy of any project on the CVS repository onto your local machine, right-click on the project and select Checkout. You will need to Checkout Documentation and Posterita projects.

File Associations To automatically open a file with a specific program by double-clicking on the file name, you should associate the file with the required program. Go to Window – Preferences – File Associations

Click Add to add a new file type.

Click OK. When presented with the window below, select External Programs then browse.

To view .sxw files with OpenOffice, select the soffice file in the folder /usr/lib/openoffice/program and click OK.

Click OK when you see the window below.
Click OK again.

Using Compiere

Connecting to Compiere

Open a web browser and type in the address bar.

Click on the blue button ¨Click Here to WebStart Me Now¨.

Select Open With: /home/user/devtools/j2sdk1.4.2_01/jre/javaws/javaws and click Open.

Click on Start

Accept the License Agreement. Fill in the Compiere Connection window as shown.

[Note that you should have edited the /etc/hosts file prior to connecting to compiere. At the terminal, type the commands below. Commands: su vi /etc/hosts hit i to be able to edit the file type oracle, press tab and type hit esc shift + : wq! (to save and quit)

Logging to Compiere

The Compiere Login window will show up.

On clicking OK, the window below will be displayed.

Click OK to log in to the system and the window below will be displayed.

Adding additional functionality to Compiere

This is a step-by-step guide for creating new windows in Compiere (version 2.5).

METHOD 1 Database creation The first thing to do is to create our database table. We’ll call our table U_Friends (Use U_tablename to indicate that it is a User Maintained table i.e created by a User). Open Aqua Data Studio and go to Server – Query Analyzer. The statement to create U_Friends table is: CREATE TABLE ORACLE.U_Friends (

U_Friends_ID  	NUMBER(10),
First_Name          VARCHAR2(20),
Last_Name           VARCHAR2(20),
Phone_Number        NUMBER(10),
Birthdate           DATE,

PRIMARY KEY(U_Friends_ID) );

Click on File – Open Script to open CreateTableTemplate.sql file in home/user/workspace/posterita/config/sql (on CVS repository in Eclipse), copy the sql statement as above and paste it in the Query Analyzer window. Execute the query and you will find that table U_Friends has been created.

There are a few important fields to note. All User Maintained tables in Compiere need to have the following columns: <table_name>_ID NUMBER(10) AD_Client_ID NUMBER(10) AD_Org_ID NUMBER(10) IsActive CHAR(1) Created DATE CreatedBy NUMBER(10) Updated DATE UpdatedBy NUMBER(10)

These field names are case sensitive and they should be typed as shown.

Copy the sql statement in the script file ALTER TABLE U_Friends add (

   AD_Client_ID	NUMBER(10),
   AD_Org_ID   	NUMBER(10),
   IsActive    	CHAR(1),
   Created     	DATE,
   CreatedBy   	NUMBER(10),
   Updated     	DATE,
   UpdatedBy   	NUMBER(10)

) and execute it to add these fields to U_Friends table.

Then execute the sql statement below select * from AD_TABLE where TABLENAME='U_MODEL' to get the AD_TABLE_ID for table U_MODEL. This table will be used as guideline to fill in the mandatory field values for our U_Friends table. Execute the sql statement select * from AD_COLUMN where AD_TABLE_ID=1000006 where 1000006 is the ID for table U_MODEL Run the first statement and replace the tablename with 'U_Friends' select * from AD_TABLE where TABLENAME='U_Friends' to get its AD_TABLE_ID value Then execute the statement select * from AD_COLUMN where AD_TABLE_ID=1000020 and you will find that only 5 rows are selected (U_Friends_ID, First_Name, Last_Name, Phone_Number, Birthdate) To fill in the mandatory Compiere fields, you will need to copy the rows displayed for Column Names AD_Client_ID, AD_Org_ID, Created, CreatedBy, IsActive, Updated, UpdatedBy for U_MODEL table and insert them for the U_Friends table. See the CreateTableTemplate.sql file.

Creating Elements We now need to create the element fields in Compiere. This is done by bringing up the Element window which can be found under Application Dictionary when logged on as SuperUser/System.

Switch to the data view using the Data Grid toggle button and click the New Record button. Now fill in the mandatory fields like this:

DB Column Name: First_Name Name: First Name Print Text: First Name Description The first name of our friend Leave the Client as System and the Entity Type as User Maintained. Repeat this for each of Last_Name, Phone_Number, Birthdate and U_Friends_ID. Note that all information in Compiere is case sensitive. This is especially important for the U_Friends_ID column.

Creating Table and Columns USE M_PRODUCT TABLE AS GUIDELINE TO CREATE COLUMNS FOR U_FRIENDS TABLE or follow the steps below.

Click on Menu – Application Dictionary – System Admin – Table and column

When the window below shows up, click OK to display all tables available.

Bringing up the Table and Columns window

Switch to the data view by clicking the Data Grid toggle button

Then click the New Record button. Fill in the fields: Name: U_Friends Description: Table of our friends DB Table Name: U_Friends Data Access Level: Client+Organization Replication Type: Local Entity Type: User Maintained As before, information is case sensitive. Make sure to check the Active and Records Deletable checkboxes.

Click on Create Columns from DB Switch to the Column tab. We’ll create the U_Friends_ID first. This column differs from the rest of the columns in that it’s the key column as well as the identifier for this table. Fill the fields out like this: DB Column Name: U_Friends_ID System Element: U_Friends_ID Name: U Friends ID Reference: ID Entity Type: User Maintained Make sure these checkboxes are checked: Active Key Column Mandatory Identifier

The AD_Client_ID and AD_Org_ID the Reference should be Table and the Validation should be AD_Client Security validation and AD_Org Security validation respectively. The Reference for Updated and Created should be DateTime, the Reference for CreatedBy and UpdatedBy should be Table and Reference Key should be AD_User. IsActive should be set to YesNo as Reference.

For the other columns, create them like this: DB Column Name: First_Name System Element: First_Name Name: First Name Length: 20 Reference: String Entity Type: User Maintained Make sure you check the Active and Updateable checkboxes for each column.

Creating Window, Tab & Field Open up the Window, Tab & Field window, create a new window and fill in Friends as the name of the window. Make sure the WindowType is Maintain, Entity Type is User Maintained and that Sales Transaction is not checked. Click the Tab tab and fill in the mandatory fields for our tab, like this: Name: Friends Table: U_Friends Entity Type: User Maintained

Click the Field tab. Now create the fields we want on our window.

Create one field for each of AD_Client_ID and AD_Org_ID. Make the Name for AD_Client_ID to Client and the Name for AD_Org_ID to Organization. Make the Sequence start at one for AD_Client_ID. Also add fields for IsActive and U_Friends_ID. Both of these should have Displayed unchecked (we don’t want to see them in our window, but they’re needed for Compiere to work correctly). These two fields will not be visible when you view the field tab.

For each of First_Name, Last_Name, Phone_Number and Birthdate enter the information like this: Name: First Name Column: First_Name Entity Type: User Maintained Display Length: 20 Sequence: (start with 3 and increment for each column) Make sure Displayed and Centrally Maintained are checked.

When done, close the window and bring up the Table and Columns window again, we now need to set our table to point to this window we just created. Select our U_Friends table and select Friends from the Window drop-down list. Add the window to the Menu Still logged on as SuperUser/System bring up the Menu window, it’s located under General Rules | System Rules.

Create a new Menu object and fill out these fields: Name: Friends Entity Type: User Maintained Action: Window Window: FriendsU_Create_Product_Button

To make this Menu show up in GardenWorld User’s tree let GardenWorld Admin create this Menu. Login as SuperUser

Select GardenWorld Admin as Role and click OK

METHOD 2 Using Druid to create tables go to and download the Druid 3.6 package. Install Druid on your PC by issuing the command java -jar druid-3.6-install.jar To create tables for Compiere using a template (and to add fields to existing tables in Compiere), you will need the file that you can download at Unzip the file and place alter-gen.jar in the druid/modules folder Run Druid by issuing the command java -jar <Druid directory>/druid.jar The window below will be displayed.

To install a JDBC driver to connect to Compiere, click on Config – jdbc drivers. Click on New and browse to select a driver.

Select oracle.jar driver (You may find it under /workspace/dms/WEB-INF/lib directory).

Click on Project – Open...

Select the Compilo Demo XML2ADProject.druid project file.

The window below will show up.

Remove the Compilo-XML2AD DB and use the template DB. You may rename it. Use the TEMPLATE table to create your table. The 7 compulsory Compiere fields are already there, you only need to add your own fields.

Right-click on the table and add the fields.

Click on <NOT SET> to select the data type for each field. The Data type Selector window will show up.

Select the required data type for each field and indicate the primary key for each table.

To include the mandatory Compiere fields (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy) in all your tables, click on the field names and copy and paste them. To generate the sql script to create the tables, first select an output file. Browse to your workspace directory and save it under dms/config/sql/. Then right-click on Sql Script – Oracle Sql and select generate. This sql script will be run from an Ant task to create the tables in the DB (ant createTable). Note that you must edit the sql script and remove the Compiere references (e.g. ID, Table Direct, String etc.) before running it.

After creating all your tables and fields, click on the database name to bring up the jdbc and connection tabs.

Enter the host name, port and sid in the url field and your username and password. Click on connect to connect to the database. If connection is successful, you will be able to click the Structure tab and view the tables.

Alternatively, you may right-click on the database name and select rebuild in jdbc DB – Oracle Sql to create the tables. (This step is now automated by running an ant script as described above).

Click on Structure to view tables you have created.

Create a system element for all fields that you do not have a system element associated with it.

Then to generate the xml file that will create the Application Dictionary in Compiere, click on Generation – Modules – Summary and add the XML module. Select an output file. Browse to your workspace directory and save it under dms/config/xml2ad/model/. Then right-click on XML and select generate. Generate the View.xml file by selecting View.xml module and click on generate. Again select an output file and save it in same location as above. Edit the menu, tab, field, tablename in the file.

You will need and files found in These files are taken from the compilo tools project and has been incorporated into our dms project. The xml file generated by Druid (YourFileName.xml) is used to create Application Dictionary for Compiere. <target name="xml2AD" depends="" description="Create AD for Compiere"> <java fork="true" classname=""> <arg value="${config.dir}/ xml2ad/model/YourFileName.xml"/> <classpath refid="compile.classpath"/>

</java> </target>

The View.xml file is used to generate the windows for Compiere.

<target name="createWindow" depends="" description="Generate Windows for Compiere"> <java fork="true" classname=""> <arg value="${config.dir}/ xml2ad/model/View.xml"/> <classpath refid="compile.classpath"/>

</java> </target>

Run the build.xml file using Ant.

Exporting/Importing Compiere Database

To export Compiere Database: use

To import Compiere Database: use imp command Example: imp login/password@SID

Jasper Reports

Download iReport-0.4.1.tar.gz from and install in /share/devtools directory. Create the report design using iReport. Create a new Java project called JasperReports. Create a lib directory and paste the jars required into it. Jakarta Commons Digester Component (version 1.1 or later) - commons-digester-1.3.jar Jakarta Commons BeanUtils Component (version 1.1 or later) - commons-beanutils-1.5.jar Jakarta Commons Collections Component (version 1.0 or later) - commons-collections-2.1.jar Jakarta Commons Logging Component (version 1.0 or later) - commons-logging-1.0.2.jar JDBC 2.0 Driver - oracle.jar iReport.jar iText - Free Java-PDF library by Bruno Lowagie and Paulo Soares (version 1.01 or later) - itext-1.01.jar

XLS Jakarta POI (version 2.0 or later) -  poi-2.0-final-20040126.jar

jasperreports-0.6.6.jar xmlParserAPIs.jar jfreechart-0.9.21.jar jcommon-0.9.6.jar

Create a folder called template and paste the report design (.jrxml file) into that folder. You will also need the file for the report. Run file to generate the pdf report.

Apache Tomcat Integration

This document provides step-by-step instructions for the installation of Tomcat 5 with Apache 2 and the JK2 Connector on RedHat 9. These instructions also apply to RedHat Enterprise 3. Begin the process by logging in as "root".


Java J2SDK 1.4.2 Installation Apache 2 Installation

Tomcat Installation

Create user account. We need to create a user account under which the Tomcat server will run. This step is critical for good security. groupadd tomcat useradd -g tomcat -c "Tomcat User" -d /usr/local/jakarta-tomcat-5 tomcat passwd tomcat Choose a very good password. Download Tomcat Download the lastest source distribution from the mirror site of your choice. Use wget or other utility as you prefer. cd /root/archive wget Verify the distribution. The Tomcat project provides MD5 checksums for the purpose of verifing download integrity but the supplied file is not formated properly to work with the md5sum utility provided by Linux. This means that you'll need to do the comparison by hand. wget cat jakarta-tomcat-5.0.25-src.tar.gz.md5 The checksum will be displayed: 25d4d89fa234d64224674c4d436192b7 Now compute the checksum of the downloaded file: md5sum jakarta-tomcat-5.0.25-src.tar.gz Which yeilds: 25d4d89fa234d64224674c4d436192b7 jakarta-tomcat-5.0.25-src.tar.gz Verify that the downloaded and the generated checksums are the same. Unpack the distribution. Use the tar utility to unpack the distribution: tar -xvzf jakarta-tomcat-5.0.25-src.tar.gz cd jakarta-tomcat-5.0.25-src Build the distribution. We'll do the build using the Ant build utility installed in the previous section. /usr/local/apache-ant-1.6.1/bin/ant WARNING: Running this command will checkout the Tomcat 5 sources from CVS, as well as download binaries to the /usr/share/java directory. Install distribution. To install we just move the jakarta-tomcat-5/build directory into place ... in this case /usr/local/. mv jakarta-tomcat-5/build /usr/local/tomcat5 Setup permissions. chown --recursive tomcat.root /usr/local/tomcat5/conf chown --recursive tomcat.root /usr/local/tomcat5/logs chown --recursive tomcat.root /usr/local/tomcat5/work chown --recursive tomcat.root /usr/local/tomcat5/webapps chown --recursive tomcat.root /usr/local/tomcat5/temp Setup admin logins. Edit the file /usr/local/tomcat5/conf/tomcat-users.xml. Remove the example entries and change the contents to: <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="admin"/> <role rolename="manager"/> <user username="admin" password="myadminpass" roles="admin,manager"/> </tomcat-users> Replace "myadminpass" with a password of your choice. Build jsvc. cd /usr/local/tomcat5/bin/ tar -xvzf jsvc.tar.gz cd jsvc-src sh support/ chmod 755 configure ./configure --with-java=/usr/local/j2sdk1.4.2_04/ make cp jsvc .. Setup init script. cp native/ /etc/init.d/tomcat chmod 755 /etc/init.d/tomcat Edit /etc/init.d/tomcat and set the following: JAVA_HOME=/usr/local/j2sdk1.4.2_04 CATALINA_HOME=/usr/local/tomcat5 DAEMON_HOME=/usr/local/tomcat5/bin TOMCAT_USER=tomcat TMP_DIR=/tmp CATALINA_OPTS= CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $DAEMON_HOME/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar export LD_PRELOAD=/usr/lib/ serverRoot=/etc/httpd export serverRoot

Also change the line:




Also change: $DAEMON_HOME/dist/jsvc to: $DAEMON_HOME/jsvc Finally add the following lines to the top of the file after the shell:

  1. chkconfig: 345 86 15
  2. description: Tomcat Server

You can download a ready-to-go copy of the init script from Add startup symlinks. We'll use the chkconfig utility to create the required start/stop symlinks. This is easier then doing it by hand. We're going to start the server in runlevels 3, 4, and 5. chkconfig --add tomcat chkconfig --levels 345 tomcat on To test the results do: chkconfig --list tomcat And look for output like this: tomcat 0:off 1:off 2:off 3:on 4:on 5:on 6:off Start Tomcat service. service tomcat start 1.Test With a web browser go to: http://myserver:8080/ You should get a page that looks similar to:

Now point your browser to: http://myserver:8080/admin You should get the login screen for the Tomcat Administration Tool:

Login with the username "admin" and the password choosen in Step 8 above and you should see:

Be aware that the "Commit Changes" button in the Administration Tool will not work properly since Tomcat is running as user "tomcat" instead of user "root". After making configuration changes you will need to restart Tomcat from the command line using the service command. service tomcat stop service tomcat start Next try going to: http://myserver:8080/manager/html A page similar to the next image should be displayed:

Finally, lets take a look at the status application at: http://myserver:8080/manager/status You'll get a page similar to this:

2.Congratulations - Tomcat is now installed!

Install JK2 Connector 1.Download JK2 Connector mod_jk2-2.0.4-2jpp.i386.rpm from

2.Stop Apache and Tomcat processes. service tomcat stop service httpd stop 3.Setup touch /usr/local/tomcat5/work/jk2.socket chown tomcat.root /usr/local/tomcat5/work/jk2.socket touch /usr/local/tomcat5/logs/jk2.shm chown tomcat.root /usr/local/tomcat5/logs/jk2.shm usermod -G apache,tomcat apache In /usr/local/tomcat5/conf/ place the following line:

  2. Configured for channel UNIX
  1. Set the desired handler list


  1. UNIX Domain socket location


  1. Dynamic Library

serverRoot=/etc/httpd apr.NativeSo=/etc/httpd/modules/ 4.Setup Create the file /etc/httpd/conf/ with the following lines:

  1. Shared memory handling. Needs to be set.

[shm] info=Scoreboard. Required for reconfiguration and status with multiprocess serve rs file=/usr/local/tomcat5/logs/jk2.shm size=1048576 debug=0 disabled=0

  1. UNIX domain socket

[channel.un:/usr/local/tomcat5/work/jk2.socket] tomcatId=localhost:8009 debug=0

  1. define the worker

[ajp13:/usr/local/tomcat5/work/jk2.socket] channel=channel.un:/usr/local/tomcat5/work/jk2.socket

  1. Announce a "status" worker

[status:status] info=Status worker. Displays runtime information.

[uri:/jkstatus/*] group=status:status

  1. Uri mapping


5.Apache config Create a file /etc/httpd/conf.d/jk2.conf with the following: LoadModule jk2_module modules/ JkSet config.file /etc/httpd/conf/ 6.Retart the servers. service tomcat start service httpd start 7.Test With a web browser try accessing the URL: A page similar to the following should be displayed:

Next try this URL: You should get a page similar to following:

8.Congratulations - JK2 is now installed!

JBoss Deployment

Tools To run JBoss, you will need the following tools: Java 2 Standard Edition SDK 1.3.1 or higher Additionally, to develop applications for JBoss, you may want the following tools: Ant 1.5 - Java build tool XDoclet 1.1.2 - Javadoc plug-in for code generation JBoss Project Template Downloading To get JBoss, go to JBoss is available there in two flavors: the standard bundle, which includes Jetty for web pages and servlets, and the Tomcat bundle, which includes (you guessed it) Tomcat instead of Jetty. As of this writing, JBoss 3.2.1 is the latest stable release. Installation To install JBoss, first unzip the distribution file to a directory of your choice. A directory named JBoss-version should be created, and it should contain the following directories: bin -- scripts client -- client jars docs -- documentation lib -- server jars server -- server configurations Second, set the following environment variables: JBOSS_HOME - Set to JBoss installation directory. JAVA_HOME - Set to Java 2 SDK home directory. Server Configurations JBoss comes with three server configurations: minimal - This configuration includes only logging, the JNDI service, and the URL deployment scanner. You would want to use this configuration for starting services that don't require J2EE or as the base for a custom configuration. default - This configuration is the default. It includes all of the J2EE services exception RMI/IIOP and clustering. all - This configuration includes all JBoss services. Startup To start JBoss: Unix: 1.Open a shell. $JBOSS_HOME/bin 3../run [-c default|minimal|all] If JBoss starts successfully, you should see something like this: 21:11:16,637 INFO [Server] JBoss (MX MicroKernel) [3.2.1 (build: CVSTag=JBoss_3 _2_1 date=200305041533)] Started in 26s:919ms Once the server is started successfully, you can verify that all of the J2EE services are up and running by opening http://localhost:8080/jmx-console/ in your browser. The JBoss Management Console will start. It shows all of the services included in the currently running JBoss configuration and various details about each service. JBoss can also run as an NT Service or a Unix service. For more information on how to do either, see the "JBoss 3.0 Quick Start Guide". Shutdown If you started JBoss in the foreground from an MS-DOS Prompt window, Command Prompt window, or Unix shell, simply press Ctrl-C in the window where JBoss is running. To shutdown JBoss in the window or shell where it is running, press Ctrl-C. To shutdown JBoss from another window or shell: Unix: Open a shell. cd $JBOSS_HOME/bin ./shutdown -S or ./shutdown --server=url

Management JBoss is managed with a web-based console. To access it, start your browser and go to "http://localhost:8080/jmx-console". To view or change the configuration for a particular service, simply click on the link to it. Additionally, with the management console, you can invoke public methods of services. For example, to shutdown the server: Open the management console. Scroll down the page to the "jboss.system" section. Click on the "type=Server" link. Scroll down to "void shutdown()" section. Click the "Invoke" button. Deploying Applications Deploying applications to JBoss could not be easier. Simply copy your application archive file -- .jar, .war, or .ear -- to the deploy directory of the server configuration that is running. JBoss will detect the file, extract the contents, and load the application. Here is an example of deploying an application to the default server configuration: Unix:

cp rotmachine.ear $JBOSS_HOME/server/default/deploy During deployment, JBoss logs messages to the console and log/server.log, which is located in the server configuration directory. If deployment is successful, you should see a message like this: 22:21:44,730 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.1/server/default/deploy/rotmachine.ear Additionally, if you open the JBoss Management Console, you should see your application listed in the "jboss.j2ee" section. Undeploying Applications Undeploying applications is even easier than deploying them. To undeploy a application, delete the application archive file from the deploy directory. JBoss will notice that the file has been deleted and undeploy the application. When undeploying an application, JBoss logs messages to the console and server.log. If undeployment is successful, you should see a message like this: 22:59:41,500 INFO [MainDeployer] Undeployed file:/C:/jboss-3.2.1/server/default/deploy/rotmachine.ear Data Sources If your application is going to connect to a database using JBoss, you will need to configure a data source for the database. Here is how to configure a basic data source: 1.If the JDBC driver library for your database is not in lib directory of the server configuration you are using, copy it there, then restart JBoss. 2.Create a data source descriptor for your database, e.g. oracle-ds.xml. 3.Deploy the data source descriptor as you would deploy an application. Here is an example of a descriptor for an Oracle data source:

  <?xml version="1.0" encoding="UTF-8"?>

Additional examples of data source descriptors can be found in JBOSS_HOME/docs/examples/jca.

Database Backup

ssh root@ip Enter Password: ********* cd /home Check if any ExpDat.jar already exists and remove it by issuing the command rm ExpDat.jar

ssh root@ip (DB Server)

Enter Password: ****** su – oracle cd /home/oracle/Compiere2/utils ./ cd ../data scp ExpDat.jar root@ip:/home Type exit to go back to root and exit again to close connection to the DB. Open new terminal on your machine scp root@ip:/home/ExpDat.jar . (copy the file to your machine) ssh root@ (password:******) cd /home/oracle rename ExpDat.jar – mv ExpDat.jar ExpDat_dev.jar exit Extract ExpDat.jar to Desktop and send ExpDat.dmp to server scp /home/jane/Desktop/ExpDat.dmp oracle@

Creating a Database ssh oracle@ Password: oracle dbca The Database Configuration Assistant wizard will show up Select Create DB and click next Select Create Data Warehouse and click next Turn off Num Lock and enter the Global Database Name (*****) Leave all default values as they are and click next for the following steps: Dedicated server mode and Custom. Click Finish SYS Password: ****** SYSTEM Password: ***** Click Password Management: OK exit

To check if DB has been created sqlplus /nolog


Enter your username: (system/pwd@SID)

system/*****@****** Connected Create user compiere identified by compiere; User created SQL> grant connect, resource, dba to compiere; Grant succeeded Connect as user compiere compiere/compiere@****** Select * from tab – no rows selected SQL>exit

[oracle@ServerDB oracle] imp compiere/compiere@****** Import file: expdat.dmp > /home/oracle/ExpDat.dmp Buffer size – 30720 List contents – no Ignore create error – no Import grants – yes Import table data – yes Import entire exp file – yes

Restart Tomcat Server

vncviewer ip:1 vncviewer (Application Server) su – root cd /usr/local/tomcat5/bin ./ ./

Start vncserver

ssh root@ To start the vncserver simply invoke the following commands: [root@roswell etc]# service vncserver start Starting VNC server: [ OK ] [root@roswell etc]# [root@roswell etc]# vncpasswd Password: Verify: [root@roswell etc]# [root@roswell etc]# vncserver

New 'roswell:1 (root)' desktop is roswell:1

Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/roswell:1.log

[root@roswell etc]# On your machine, open a new terminal and enter the command: vncviewer Enter password.

For killing VNC type vncserver -kill :vncID on your remote machine for example, "vncserver -kill :1".

Installing FogBugz on Linux

To install FogBugz for Linux on your server: 1.Log on as root or issue the su command. (Root user is not fully necessary, e.g. if you are having FogBugz hosted remotely. 2.Before you start, you'll need to know three things about your system. Figure these out and make a note of them:

                 The group under which Apache runs (?) 
     The location of your Apache web server configuration file (?) 
     The location of your php.ini configuration file (?)
       3.  Uncompress the tar.gz file which you downloaded in the directory where 	 you want FogBugz to live. We recommend /opt.
           $ mv fogbugz-setup-php-*.tar.gz /opt
           $ cd /opt
           $ tar zxf fogbugz-setup-php-*.tar.gz
           $ cd fogbugz
             Run the install.php script:
             $ php -d output_buffering=0 -f install.php
            Note: that's a zero, not the letter O.
      4. When this has completed, launch your web browser and navigate to   
      When you have finished setting up FogBugz, remember to set up Dispatcho,
             the email integration component of FogBugz. 
           If you encounter problems during setup, please take a look at our                      
           Troubleshooting section. 

Setting up Dispatcho

Dispatcho is a daemon which should be running at all times. It is used to forward email from a POP3 server into the FogBugz database, and to perform certain routine maintenance tasks. (Dispatcho errors are logged to the syslog). Certain php.ini settings may affect Dispatcho's ability to correctly handle messages with attachments. We recommend that you increase the following settings to these values. Note: If these settings conflict with the settings required by any other PHP-based applications on your web server, please see the PHP documentation for alternatives - you may be able to edit these in fogbugz/fogbugz.conf.

php setting recommended value max_execution_time 600 max_input_time 600 memory_limit 50M upload_max_filesize 50M post_max_size 50M

Certain MySQL settings may also affect Dispatcho's ability to correctly handle messages. You should increase the MySQL max_allowed_packet setting to "50M". You can change this setting in the my.cnf file usually located in your mysql/data directory. See the MySQL site for more info. Lastly, on some machines (RedHat 9 notably), PHP files are set to limit uploads to 500k. Look for a file called php.conf in your httpd/conf.d directory. If there is a value called LimitRequestBody, set it to 0 (meaning unlimited). If you cannot upload files over 500k, this is why. In the FogBugz/Accessories folder, there is a shell script named dispatchod which can be used to start and stop the Dispatcho daemon: $ dispatchod start $ dispatchod stop To set up dispatcho: 1.Log on as root or issue the su command 2.Start dispatcho now:

$ cd (your FogBugz directory) $ cd Accessories $ ./dispatchod start 3.Add it to your server's startup scripts so it starts automatically when your server is rebooted. The way to do this is different on virtually every variety of Unix.

Red Hat or Mandrake Linux: Add a line to the bottom of your /etc/rc.local file: (your FogBugz directory)/Accessories/dispatchod start Debian Linux: Create this short shell script in your /etc/rc.boot directory, named

  1. !/bin/sh

(your FogBugz directory)/Accessories/dispatchod start Make the script executable: $ chmod +x SuSE Linux: Add a line to the bottom of your /etc/init.d/boot.local file: (your FogBugz directory)/Accessories/dispatchod start FreeBSD: Create this short shell script in your /usr/local/etc/rc.d directory, named

  1. !/bin/sh

(your FogBugz directory)/Accessories/dispatchod start

            Make the script executable:

$ chmod +x

Welcome to FogBUGZ. You are Logged on as Administrator (Log Off) List Enter a New Case Search Change Your Personal Preferences Show me cases assigned to me Add, Remove, or Edit Projects Manage Users Welcome to FogBUGZ. You are Logged on as Administrator (Log Off) List Enter a New Case Search Change Your Personal Preferences Show me cases assigned to me Add, Remove, or Edit Projects Manage Users Configure this Site Edit Connected Mailboxes Edit License Information FogBUGZ Help Contact the Local FogBUGZ Administrator FogBUGZ Version 3.1.21 (DB 328) Configure this Site Edit Connected Mailboxes Edit License Information FogBUGZ Help Contact the Local FogBUGZ Administrator FogBUGZ Version 3.1.21 (DB 328)

Installation of Red Hat AS 3.0 Linux

Insert CD1 and reboot PC.

Press Enter to install in Graphical mode.

Skip testing CD media.

Linux system installer will run.

Welcome page will appear. Click next.

Language – choose English.

Keyboard – U.S. International

Mouse – Wheel Mouse PS/2

Disk Partitioning setup – Choose Automatically partition

Automatic Partitioning – choose Remove all partitions on this system

Select drive to use for this installation – leave default settings. Click next – a warning dialog box will pop up asking if you want to remove all partitions on the drive – click Yes. The partitioning window will appear – Click next.

Boot loader configuration Do not change boot loader. Check the configure advanced boot loader options checkbox. Click next.

Advanced boot loader configuration Install Boot Loader on: Master Boot Record Click next

Network configuration Leave default settings and click next

Firewall Security level: Enable firewall Check WWW(HTTP) and SSH Click next.

Additional language support Select English USA Click next

Time zone selection Select Asia/Muscat Click next

Set root Password 'secure password' Click next.

Package Defaults Select Customize set of packages to be installed Click next

Package group selection Servers – Uncheck Web Server System tools – select only vnc Click next

About to install – click next Installing packages Formatting file system

Change CD – insert CD2 and click OK

Insert CD3 It will prompt you to insert CD1

Graphical interface (X) Configuration leave default settings Click next.

Monitor Configuration leave default settings Click next.

Customize graphical Configuration leave default settings Click next.

Congratulations – installation is complete. Click Exit. System will reboot.

Welcome page will appear and click next. License Agreement – click Yes I Agree and click next

Date and Time settings Click next

User Account Create a user (posterita/'secure password') and click next.

Red Hat Network Choose No I do not want to register my system.

Additional CDs Click next

Finish setup. Click next.

Login window will appear.

Login as root – password 'secure password'.

Configure network settings Click on start (redhat) system settings, Network. Select eth0 and double click on it. Select statistically set IP addresses Manual IP Address settings Address: Subnet Mask: Default gateway Address:

Click OK.

Select the DNS tab Primary DNS: Close the network configuration window.

Logout and login as the user created (posterita) to install software packages.

Installation of Java Web Development tools on Red Hat AS3.0

create a directory devtools in home/posterita mkdir devtools su password: 'secure password' chown -R posterita:posterita /home/posterita/devtools (to give permissions to user) download the software installation files to devtools directory.


Download j2sdk1.4.2_01

Download j2sdk-1_4_2_01-linux-i586.bin at Issue the command ./j2sdk-1_4_2_01-linux-i586.bin


Enter vi /home/posterita/.bash_profile Add the following lines: JAVA_HOME=/home/posterita/devtools/j2sdk1.4.2_01 PATH=$JAVA_HOME/bin:$PATH:$HOME/bin export JAVA_HOME Logout and re login. (iii) Running Application on Terminal Command: java or javac If installation was not done properly, an error message will be displayed. 3.

Ant 1.5.4

Download Download at


Extract the file.


Enter vi /home/posterita/.bash_profile Add the following lines: ANT_HOME=/home/posterita/devtools/apache-ant-1.5.4 PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH:$HOME/bin export ANT_HOME export PATH

Running Application

Commands: ant Ignore the warning message displayed.

Jakarta Tomcat 5.0.12

Download Download jakarta-tomcat-5.0.12.tar.gz at


Then type the commands below to extract the files to the home/posterita/devtools directory. Commands: cd /home/posterita/devtools tar xvzf jakarta-tomcat-5.0.12.tar.gz

Configurations Modify the following line in CATALINA_OPTS block in jakarta-tomcat-5.0.12/bin/ file CATALINA_OPTS=”$CATALINA_OPTS $JPDA_OPTS” to read


Create a user in tomcat-users.xml file <tomcat-users> <role rolename="manager"/>

 <user username="root" password="seucre password" roles="manager"/>

Create a file called ROOT.xml in home/posterita/devtools/jakarta-tomcat-5.0.12/conf/Catalina/localhost Copy the contents of file admin.xml and paste it in the ROOT.xml file. Edit the context path line to read: <Context path="" docBase="dcs" debug="0" privileged="true">

Edit the server.xml file and make the following changes in the Connector port=8080 container. Connector port=80 maxthreads=300 maxsparethreads=150

Running Application: Commands: ./



Download cvs-1.11.17-1.i386.rpm at (Copy the url above and paste it in your browser)

Installation Issue the command below to install rpm -ivh cvs-1.11.17-1.i386.rpm

Configurations Edit the .bashrc file (for the user who will run ant) and add the following lines: export CVS_RSH=ssh export CVSROOT=:ext:vickram@ Save the .bashrc file and exit. Logout and login again.

DCS Deployment

Make sure that tomcat is NOT running. Copy the build.xml file into /home/posterita/ cd /home/posterita ant runDeploy

Oracle Installation on Red Hat Advanced Server 3.0

Setting Swap Space

In order to perform a typical Oracle 9i installation and to create a simple prototype database, Oracle says that you need a minimum of 512MB of RAM for the Oracle9i (9.0.1) Server, and the amount of disk space (swap space) should be equal to twice the amount of RAM or at least 400 MB, whichever is greater. I tried to test the limits on an older PC with 256 MB of RAM and with 600 MB of swap space.

NOTE: If you do not have enough swap space or RAM during the Oracle installation, in particular during the database creation, your Oracle server (Linux) will temporarily become unresponsive to any events for several minutes.

To check the memory, run: grep MemTotal /proc/meminfo

To check the swap space, run: cat /proc/swaps

You can also add temporary swap space by creating a temporary swap file instead of using a raw device. Here is the procedure: su – root dd if=/dev/zero of=tmpswap bs=1k count=900000 chmod 600 tmpswap mkswap tmpswap swapon tmpswap

To disable the temporary swap space execute the following commands: su – root swapoff tmpswap rm tmpswap

Setting Shared Memory

For Oracle 9i (9.2.0) installation I had to increase the maximum shared memory size on my Linux server for all Red Hat versions. The Oracle Database Configuration Assistant displayed the following error message on my server: ORA-27123: unable to attach to shared memory segment.

I temporarely increased the shmmax setting for the kernel by executing the following command: $ su - root

  1. cat /proc/sys/kernel/shmmax


  1. echo `expr 1024 \* 1024 \* 1024` > /proc/sys/kernel/shmmax
  2. cat /proc/sys/kernel/shmmax

1073741824 It is recommended to increase the shmmax setting permanently for Oracle. For more information, see Setting Shared Memory.

For more information on optimizing shared memory settings for Oracle databases on Linux, see Setting Shared Memory. These parameters apply to all Red Hat Linux versions. But note that except for the shmmax parameter, these parameter do not need to be changed for installing Oracle on Linux. But you might want to adjust all shared memory settings later to optimize the server for Oracle.

Checking /tmp Space

The Oracle Universal Installer requires up to 400 MB of free space in the /tmp directory.

To check the space in /tmp, run: $ df /tmp If you do not have enough space in the /tmp directory, you can temporarily create a tmp directory in another filesystem. Here is how you can do this: su - root mkdir /<AnotherFilesystem>/tmp chown root.root /<AnotherFilesystem>/tmp chmod 1777 /<AnotherFilesystem>/tmp export TEMP=/<AnotherFilesystem> # used by Oracle export TMPDIR=/<AnotherFilesystem> # used by Linux programs like the linker "ld"

When you are done with your Oracle installation, shutdown Oracle and remove the temporary directory: su - root rmdir /<AnotherFilesystem>/tmp unset TEMP unset TMPDIR

Checking Development Packages (RPMs)

Development Packages (RPMs) for Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3): To see if these development packages are installed on your server, run the following command: rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils

Installing Oracle9iR2 on RH AS 3

Install the following RPMs (see Oracle Note:252217.1 for more information): su - root rpm -ivh \ compat-db-4.0.14-5.i386.rpm \ compat-gcc-7.3-2.96.122.i386.rpm \ compat-gcc-c++-7.3-2.96.122.i386.rpm \ compat-libstdc++-7.3-2.96.122.i386.rpm \ compat-libstdc++-devel-7.3-2.96.122.i386.rpm \ openmotif21-2.1.30-8.i386.rpm \ setarch-1.3-1.i386.rpm \ tcl-8.3.5-92.i386.rpm Relink gcc so that the older gcc will be used during the Oracle installation (see Oracle Note:252217.1 for more information): su - root mv /usr/bin/gcc /usr/bin/gcc323 ln -s /usr/bin/gcc296 /usr/bin/gcc mv /usr/bin/g++ /usr/bin/g++323 # if g++ doesn't exist, then gcc-c++ was not installed ln -s /usr/bin/g++296 /usr/bin/g++

Creating Oracle User Accounts

su - root groupadd dba # group of users to be granted with SYSDBA system privilege groupadd oinstall # group owner of Oracle files useradd -c "Oracle software owner" -g oinstall -G dba oracle passwd oracle For more information on the "oinstall" group account, see When to use "OINSTALL" group during install of oracle.

Creating Oracle Directories

In this example, make sure that the /opt filesystem is large enough, see Oracle Disk Space for more information. If /opt is not on a separate filesystem, then make sure the root filesystem "/" has enough space. su - root mkdir /opt/oracle mkdir /opt/oracle/product mkdir /opt/oracle/product/9.2.0 chown -R oracle.oinstall /opt/oracle

mkdir /var/opt/oracle chown oracle.dba /var/opt/oracle chmod 755 /var/opt/oracle

Setting Oracle Environments

Set the following Oracle environment variables before you start runInstaller.

As the oracle user execute the following commands:

  1. Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9 and
  2. for Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3) !!
  3. Use the "Linuxthreads with floating stacks" implementation instead of NPTL:

export LD_ASSUME_KERNEL=2.4.1

  1. Oracle Environment

export ORACLE_BASE=/opt/oracle export ORACLE_HOME=/opt/oracle/product/9.2.0 export ORACLE_SID=test export ORACLE_TERM=xterm

  1. export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin

export NLS_LANG=AMERICAN; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH

  1. Set shell search paths


I successfully installed Oracle9iR2 without setting the following CLASSPATH environment variable:

  3. export CLASSPATH

You can put these environment settings at the end of the ~oracle/.bash_profile file if you use bash. By this way you don't have to set the environment variables again when you login as "oracle", or when you switch to the user "oracle" by executing "su - oracle".

When you execute runInstaller from the Oracle 9iR2 (9.2.0) CD, you will get the following error message: Error occurred during initialization of VM Unable to load native library: /tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386/

   symbol __libc_wait, version GLIBC_2.0 not defined in file with link time reference

To resolve the __libc_wait symbol issue, download the patch from See bug 3006854 for more information.

To apply the patch, run su - root

  1. unzip


  creating: 3006854/
 inflating: 3006854/
 inflating: 3006854/README.txt
  1. cd 3006854
  2. sh

Applying patch... Patch successfully applied

NOTE: If you get the following error when you run line 36: gcc: command not found

Then you forgot to install or link gcc, see above. This means you can't start any binaries any more:

  1. ls

ls: error while loading shared libraries: /etc/ cannot open shared object file: No such file or directory

  1. rm /etc/

rm: error while loading shared libraries: /etc/ cannot open shared object file: No such file or directory

To fix that, run the echo command which is a built-in shell command:

  1. echo "" > /etc/

rm /etc/ And start over again.

Starting runInstaller

Before you continue, make sure you have set the Oracle environment variables, see above.

Oracle no longer supports a character mode installer. Therefore, in order to execute runInstaller directly from a console of a machine you are logged into (in this example the node name where Oracle is running is called "oracleserver"), you need to set the DISPLAY environment variable. Before you do that, make sure that you also allow runInstaller on "oracleserver" to display X information on your Linux desktop machine (in this example, the PC name where you are running X Windows like KDE or GNOME is called "yourdesktop"), because programs running on remote machines cannot display information to your screen unless you give them the authority to do so. Note that the X display relink mechanism does not work for NT desktop machines unless you use Exceed.

Before you run runInstaller, execute e.g. 'xterm' to see if your X setup is really working! If you install Oracle on your desktop PC and not on a remote node, then you can skip step 1 and 3.

Step 1: Allow "oracleserver" to display X information to your desktop PC "yourdesktop":

 yourdesktop:user$ xhost +oracleserver

Step 2: Open a new window and login to the Oracle server "oracleserver" as root. This window will be used for mounting and unmounting the Oracle CDs.

 oracleserver:$ su - root
 oracleserver:root# mount /mnt/cdrom

Step 3: From the console of your Oracle server "oracleserver" where you will run runInstaller, execute the following commands:

 oracleserver:$ su - oracle
 oracleserver:oracle$ export DISPLAY=yourdesktop:0.0

Step 4: Now execute runInstaller as "oracle". Do not cd to /mnt/cdrom !!

 oracleserver:oracle$ /mnt/cdrom/runInstaller

NOTE: Don't run runInstaller for Red Hat Enterprise Linux Advanced Server 3 (RHEL AS 3) yet! See Running Oracle Installation on Red Hat Enterprise Linux Advanced Server 3 for more information. oot. This window will be used for mounting and unmounting the Oracle CDs.

 oracleserver:$ su - root
 oracleserver:root# mount /mnt/cdrom

Step 3: From the console of your Oracle server "oracleserver" where you will run runInstaller, execute the following commands:

 oracleserver:$ su - oracle
 oracleserver:oracle$ export DISPLAY=yourdesktop:0.0

Step 4: Now execute runInstaller as "oracle". Do not cd to /mnt/cdrom !!

 oracleserver:oracle$ /mnt/cdrom/runInstaller

./runInstaller to start the installation of Oracle. A wizard will appear and guide you for the rest of the installation.

now once the oracle is installed oracle $sqlplus /nolog

SQL> connect / as sysdba SQL> startup

then U can connect to the schema by command SQL> connect username/password@SID the SID is the name of the DB during installation.

BIRT 1.0 Installation

Below are complete instructions for installing BIRT. The instructions here are for the 1.0 release build.


You'll need a Java J2SE 1.4 JDK. The latest version, at the time of writing, is 1.4.2_08. Download J2SE v 1.4.2_08 SDK and install it. (BIRT includes an embedded version of Apache Jakarta Tomcat for previewing reports. Tomcat's JSP engine requires a Java compiler and so you must install the JDK, not just the JRE.)


BIRT is compatible with Eclipse 3.0.1. BIRT will not run with Eclipse 2.x; and has known problems with the Eclipse 3.1 milestone builds. BIRT has not been tested with the Eclipse 3.0 release. Download and install the Eclipse Platform 3.0.1 Release. (Note: Eclipse, EMF, GEF and BIRT are all available from the Eclipse download page.) Eclipse comes as a zip file or tar file.


GEF, the Graphic Editor Framework, is an Eclipse plugin used by the BIRT UI. Download the GEF 3.0.1 Release, GEF Runtime ( GEF comes as a zip file. Unzip GEF into directory that contains Eclipse.


The BIRT charting feature uses EMF, the Eclipse Modeling Framework. Download the EMF & SDO RT version 2.0.1 ( Look in the Latest Releases sections of the download page. EMF also comes as a zip file. Unzip EMF into directory that contains Eclipse. This is the same directory you used for GEF.


Download the BIRT is also a zip file. Unzip BIRT into the directory that contains Eclipse.

JDBC Drivers

You will likely want to use your own JDBC driver with BIRT. Use the data source editor’s JDBC driver management wizard. To start the wizard, open a BIRT report design, go to the Data Explorer view, right click on “Data Sources” and select “New Data Source”. Choose “JDBC Data Source” and click “Next”. In the next dialog, choose “Manage Drivers…” to bring up the “Manage JDBC Drivers” dialog. In the “JAR Files” tab, click on “Add…” to add the JAR file required by your JDBC driver. Then go to the “Driver” tab to confirm that the list of drivers includes the new drivers added. You may also want to assign a display name and URL template for the new drivers in this tab.

Before using BIRT

BIRT uses a browser for report preview. Eclipse works with a specific version of the Mozilla browser. See the SWT Linux Browser FAQ for details. If you have an incorrect version, an error message similar to the following may appear in your log file:

!MESSAGE No more handles (java.lang.UnsatisfiedLinkError:
undefined symbol: _ZN9nsCStringC1Ev

That is, different versions of the Mozilla browser may not be binary compatible with the version used by Eclipse, resulting in the undefined symbol errors. Check your browser version:

# mozilla -version
Mozilla 1.7.6, Copyright (c) 2003-2004, build 2005032401

If it is incorrect (according to the FAQ above), switch to the correct version. Here's how to do this on Linux: Uninstall your current Mozilla browser. Fetch mozilla-1.6-xft-gtk2-pc-linux.tar.bz2 from and install it in /usr/local/mozilla/mozilla Add /usr/local/mozilla/mozilla to /etc/ and run ldconfig to get the libpath updated. Check that Eclipse uses your new Mozilla installation by issuing the following command:

ldd <path to
eclipse>/eclipse/plugins/org.eclipse.swt.gtk_3.0.1/os/linux/x86/ => /usr/local/mozilla/mozilla/ .....

If points to your newly installed Mozilla, you are on the right track. But if you start Eclipse and run BIRT you may now get the following new error:

org.eclipse.swt.SWTError?: No more handles [Unknown mozilla path]

To resolve this error, add the following to the .bashrc file in your home directory:


To be sure the new environment variable is sourced, open a console and type:

source ~/.bashrc

Now run Eclipse from the same terminal. cd to you eclipse home and type ./eclipse and you should be home free.


BIRT is a perspective within Eclipse. To open it, use the Window item on the Eclipse main menu. Choose Open Perspective, then Report Design. If report Design does not appear directly in the Open Perspective window, then choose Other... A list of perspectives will appear. Choose Report Design. Eclipse will switch to display the BIRT perspective.

Create a Project

Eclipse uses projects to organize your files. So, the first step is to create a new project. For this demo, let's create a project called "My Reports": Choose File→New→Project. The new project dialog appears. Open the "Business Intelligence and Reporting Tools" group and choose "Report Project". Click Next. Type "My Reports" (without the quotes) as the project name. Click Finish. Click OK if asked to switch to the Report Design perspective. (This occurs if you create a BIRT project while in a perspective other than Report Design.)

Create a Report

We're now ready to create our first report: Choose File→New→Report. The new report dialog appears. In the tree view, choose the project we just created: My Reports. Enter the following in the file name field: Customers.rptdesign. Click Next. You can create a report in three ways: as a blank report, by using a BIRT-defined template, or by copying one of your report designs. The second page of the New Report dialog provides two of these options. Since we want to use a template, do the following: Select "Create Report from a predefined template" Click Next.

Choose a Template

The next page of the New Report dialog presents a selection of report templates. Before we choose the one we want, let's walk though what's available.

Blank Report – A simple blank report with no content.

My First Report – Starts a report template that takes you through a tutorial using on-line help. (That tutorial will eventually replace this one.)

Simple Listing – A tabular listing with no grouping.

Grouped Listing – A tabular listing with grouping. Grouping shows repeated values just once. Grouping also allows you to create subtotals.

Dual Column Listing – Produces a listing with two columns side-by-side.

Chart & Listing – A tabular listing that adds a chart to the top of the report.

Dual Chart & Listing – Combines charts and tables so you can display two sets of related data in a single report.

Side by Side Chart & Listing – A visual variation of the above.

Letter – A form letter in which database data is "mail-merged" into the text. The letter text can be formatted using a subset of HTML. We're now ready to choose our template: Select the Grouped Listing. Click Finish. BIRT opens your new report in the Eclipse workspace.

Creating a CVS Server

Login as root.

Add a group cvs to your server.

 groupadd cvs 

Create users for group cvs

useradd -g cvs username

Create password for every user that has been created. The command is

 passwd username

and this will prompt for the password you want to set for this user.

Create cvs repository. Create directory cvs under usr/local by issuing the command

 mkdir cvs 

Make group cvs own this directory.

 chown root:cvs /usr/local/cvs

Give rwx access to group cvs on the repository /usr/local/cvs and rwx to owner root. chmod 775

Create repository

 cvs -d /usr/local/cvs init 

N.B.:Always use absolute path name to specify repository.

White Paper

The golden Rules of Posterita: Compile time error is better, than runtime error. <-- Give examples Exception, static final String, class.getName(). This we are going to complete it bit by bit.


Degree of complexity 1, Beginner The factory is a creational design pattern. All of a types of Objects that is needed by the system is actually created there.

In our precise example, all process must be created, instead of creating them manually by adding them in the database, we prefer to actually hardcode it, by doing something like:

Process process = new Process(); process.setName(NAME); process.setClassToBeUse(CLASS);;

The reason is that, it is easier to recreate a working system, even in the eventually of a database failure, also shall we decide to change the database structure, there is no need for a migration to take place, all we will have to do is re-run this set of code with its alteration.

However if we leave the code in such a state, then if we shall create another Process we will have to copy and paste this code to do it again. As you all know, when you feel a need to copy and paste, it means there are some abstraction that we can do.

Process process = new Process(); process.setName(NAME); process.setClassToBeUse(CLASS);;

Process process = new Process(); process.setName(NAME2); process.setClassToBeUse(CLASS2);;

This can be easily solved by moving the creation of the process into a method that takes some parameters.


static void createProcess(String Name, String class) {

    Process process = new Process();


Then if we had to create 2 processes all we will have to do is:

static {

    createProcess("hello world", "com.posterita.process.HelloProcess");
    createProcess("posterita Process", "com.posterita.process.PosteritaProcess");


// take notice of the static method implemented here, we will explain in more details why it is there at the end of this tutorial on factory.

and etc... if we had more than 2 processes.

The problem with using com.posterita.process.HelloProcess as a string to instantiate the class later on is that it is error prone, so we rather have a compile time error saying that the class does not exist than having to wait until runtime, to get the error. And also we make use public static final String for the parameters. Compile time error is better than runtime error That is a golden rule!

Hence we do the following.

createProcess(HELLO_WORLD, HelloProcess.class.getName()); createProcess(POSTERITA_PROCESS,PosteritaProcess.class.getName());

Wow great so now we can create a lot of processes, without having to enter them manually into the system.

Yess... but!! We still have some problem What happens, if you re-run this class again?

Well it's going to create some more processes with exactly the same name, you are going to end up with thousands of Hello World processes with different ids into your system if you keep running this class.

Again that is easy to solve, all you have to do is check whether the process is already there before you save/create it again.

How do you do that? Well the easy answer that you are going to tell me is: We check if that name already exist, and then if it's there then we do not recreate it.

Unfortunately, am not happy with that answer, simply because, while the system is live, people might go and change the name of your process, but it is still the same process, although they shouldn't be doing it, that is still a risk. If they manage to do that, your system is at risk of being unusable, just because they changed the name, from "Hello Process" to Goobye Process.

What identifies an object is its ID not its name, so when we create the process, we must keep track of the ID. The ID you get it only after the process has been saved. So we'll do something like this, notice that we are using the name as the reference, but this name is not saved into the Database where the user has access. It will be saved in a property file, of course the property file also could be changed by the user but we do have more control over that file than the database, we can restrict the access.

createProcess(String Name, String class) {

    Process process = new Process();
    saveIDProcess(Name, process.getID());


Once the ID has been saved then prior to creation, we must actually retrieve the ID, and we do this:

createProcess(String Name, String class) {

    int ID = getIDfromPropertyFile(Name);
    Process process = loadProcess(ID);
    if (process == null)
        Process process = new Process();
        saveIDProcess(Name, process.getID());


Supa Dupa, now I have a robust system, that allows me to create Processes and once it is created it will not create it again. Cool I want to get some processes now.

Easy peazy, just implement a get method:

getProcess(String name) {

    int ID = getIDfromProperty(Name);
    Process process = loadProcess(ID);
    if (process == null)
        throw an exception.


But how do I use this method, well by making sure you have declared the HELLO_WORLD, and the POSTERITA_PROCESS static, then it is easily accessible by doing.


and you wouldn't be able to get any other variables except the static one. We could actually make it more robust by doing some interface, but honestly that would be an overkill for this, and it is fairly intuitive.

So are we done?

No not yet!!

not yet?!?

Well I still have a problem with that class.

Jeez you have a lot of problem. Mr Architect.

Yup! you see the problem with this getMethod is whenever you access a database, it is expensive.

You mean there is a fee to be paid.

Don't be silly! accessing the database is expensive in the sense of performance, in all the lines we have written more than 99% of the performance is spent in the accessing the database, either by loading it or by actually saving it.

Saving the process, is not an issue since it will be done only once. And the user will not be affected by it, only the developpers. Users have it easy remember. However the loading part of it does affect the user, and for object that are used throughout the system. It is simply not acceptable.

Haha, i know we can implement a cache.

wow, now you are impressing me. That is exactly what must be done. And for that you use the Hashmap.

it's very simple really all you have to do is in the getMethod(), you do the following:

static HashMap map = new HashMap();

static getProcess(String name) {

    Process process  = (Process) map.get(name);   // the hashmap implementation returns an object, however we know that we only put Process in this map so it is safe for us to cast                                                                           // it back to Process
    if (process == null)
        int ID = getIDfromProperty(Name);
        process = loadProcess(ID);
        map.put(name, process);

//If still null throw an exception

    if (process == null)
        throw an exception.


Now the reason, this method has changed to static is because without it, every time you make a new instantion of this object, a new cache will be created, so really it defeats the purpose of the cache. That is why am using static, because static is a variable that is for the class, and not for the instance of the class.

Aaarrrgghhh I don't understand class and instance of the class.

In a very simple way a class is like a person, and the instance of a person, is you or anybody else in that room. a static variable that we could think of is:

static int totalNumberOfPersonInTheUniverse;

So now you see, for every person that you create you would increment this number. And therefore from a single individual, by looking at this static variable you could know, the total number of individuals in the universe.

To come back now on the static method we used previously, we actually used a static initializer.

uh a what?

Well you do know about the constructor, the static initializer is sort of equivalent of the construct for the class and not for the instance of the class. So the static initializer is call only once when the class is being refered for the first time. The advantage of this is that whenever you call a get method on this object, you are guaranteed that the Process objects will be created for you directly. If we did not do this, and for example we make sure that the factory is initialise at the beginning of the program, that is we could do soemthing like:

public static void main(String args[]) {

   // NOW the program starts and u can call factory.


to call a method from the factory once, the system is started. Our system would not be robust, because by calling the get method in the wrong place, would make us get NULL if no objects have been created. And also it would not be flexible because it would have to be use in conjunction with another class. In that case it is assuming that this method method will be runned. What if we are calling another main method? well it wouldn't initialise unless you specifically mention it. Now that's bad, because you made a class that is assuming to many things to run properly, it is then not robust nor flexible and it is then not developer friendly.

Now surely this is the end of this class. Well yes it is... BUT !!

what there is a but?

yes indeed, but if there are more than just processes that you want to create like now you want to create individuals, or cars. Can you imagine having to re-implement the caching and the ID over and over again?

When you have a small system, this class will do, but it does not fit when you deal with a large system, for that we would actually perform another layer of abstraction by having an abstract factory. That would be for another tutorial.

Technical Paper

What is a Manager?

A Manager is where business logic of an application resides. Complex computations and processing of data takes place in a Manager. CRUD (Create, Retrieve, Update and Delete) operations also take place in the Manager. In the Manager, we can only have simple objects as parameters such as String, Integer, int, Date, Boolean, etc. The Manager should not take complex objects as parameters.

How to write an Action?

The Action should retrieve all the parameters that are needed by the Manager. The parameters may be retrieved from user input, cookie, session or application. Basically, all objects that are related to the Web or Struts must remain inside the Action code. No business logic must be found inside an Action. In an Action we can put objects which are returned by the Manager into sessions. In Action we can also display the error messages by adding the appropriate exceptions.

How to write a test

Do not make use of System.out.println Make use of JUnit assert statements. All data that is need by the test should be created by the test itself by making use of JUnit setUp method. All data created by the test should be delete by the test itself using JUnit tearDown method.

Purpose of tests

To make sure that the Managers (business logic) are working properly. It will help us save time by automating manual tests that have to be carried out after code changes. We can run them several times and at any time to check that the addition of a feature has not broken the existing codes. It also make sure that specifications are implemented as desired.

How to write a Bean

Every new bean that is made should extend PosteritaBean and has its fields defined in that class. Implementation of the setters and getters is defined in the new bean. eg We need a bean that will hold information about a product. Lets call this bean a ProductBean The fields are productName, productID, price.... the PosteritaBean will look like this public class PosteritaBean { protected String productName; protected Integer productID; protected Double price; } and the ProductBean public class ProductBean { public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public class BpartnerKeyNamePairs extends KeyNamePairUtil { public ArrayList getKeyNamePairs(Properties ctx) { //now we want to retrieve the business partners //who belong to our client only String sql = “ ad_client_id=” + Env.getAD_Client_ID(ctx); ArrayList list = getData(Properties ctx, MBPartner.Table_Name, sql); return list; } } public String getProductID() { return productID; } public void setProductID(String productID) { this.productID = productID; } // and so on } The reasons why we use this strategy are: 1. To avoid repetition of setters and getters in different beans 2. To avoid confusion, for example a warehouse bean would not have getters and setters of a productBean.

Getting key-name pairs

A keyname pair is an association between an id and a name. To get keyname pairs from a table we use the class KeyNamePairUtil. KeyNamePairUtil has a method getData which take as parameters ctx, tableName and a whereClause. We must not use this class directly. Instead we must extend KeyNamePairUtil. eg. Suppose we need to get a list of the ids (C_BPartner_ID) and names of business partners, we create a class and make it extend KeyNamePairUtil.

public class BpartnerKeyNamePairs extends KeyNamePairUtil { public ArrayList getKeyNamePairs(Properties ctx) { //now we want to retrieve the business partners //who belong to our client only String sql = “ ad_client_id=” + Env.getAD_Client_ID(ctx); ArrayList list = getData(Properties ctx, MBPartner.Table_Name, sql); return list; } }

Committing files to CVS

1.First run an update

2.compile test (ant test) tomcat and test


See Also