Installation Guide for ADempiere using WebSphere Application Server

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

Overview

This guide should be used for installing ADempiere with WebSphere Application Server. It has been written generically, so that it can be tailored to suit the purposes of different Operating Systems. If you require more information about setting up ADempiere in your chosen environment, please refer to the other installation guides.

Limitations

  • Posterita not supported
  • WebStore not supported

Tested ADempiere Versions

  • 3.4.0
  • 3.3.1b

Prerequisites

  • Java Development Kit (JDK) 1.5.0_14 (Do not install newer versions of Java or simply the JRE)
  • WebSphere Application Server 6.1.0.17
  • Eclipse IDE for Java EE Developers

ADempiere Installation

Set the following environment variables to their relevant directories:

  • JAVA_HOME – the directory where java is installed
  • ADEMPIERE_HOME – the directory where ADempiere is installed, usually C:\Adempiere or /Adempiere)


Database Installation

Install either PostgreSQL, Oracle 10g or Oracle 10g XE. You will need to know the administrator password for the database to continue with the ADempiere setup.

If you choose to install PostgreSQL you will also need to download and install PL/Java. Note that certain versions of PL/Java have compatibility issues with certain versions of PostgreSQL. One combination that has been tested and works is PostgreSQL 8.1 and PL/Java 1.3. PL/Java is available from here.

Run the ADempiere setup

Download ADempiere from source forge and extract the archive to a known directory (the root directory is recommended).


If you have GUI access use RUN_Setup.sh/RUN_Setup.bat to install ADempiere. You will be prompted to enter your configuration. Enter all necessary details and click test. Once all tests have passed click save to install ADempiere.


If you do NOT have GUI access you will need to copy the contents of the file ADEMPIERE_HOME/AdempiereEnvTemplate.properties into a new file named ADEMPIERE_HOME/AdempiereEnv.properties. Modify the various properties in the new file to suit your installation, save it and run RUN_SilentSetup.sh.

Once the installation has been successfully completed you will need to setup the database tables for the application to use. This can be done by running the script ADEMPIERE_HOME/utils/RUN_ImportAdempiere.sh or in Windows ADEMPIERE_HOME\utils\RUN_ImportAdempiere.bat.


ADempiere should now be setup to work for JBoss.


Migrating to WebSphere Application Server

In the command prompt change the working directory to: ADEMPIERE_HOME\jboss\server\adempiere\deploy\adempiere.ear


Package the exploded ear into a compressed file using:

 jar cvfM adempiere.ear *


Open eclipse and go to file -> import. Select J2EE -> ear file. Locate the compressed ear file and use all of the default settings. Do NOT select a target runtime. Click Finish.


Open up the application deployment descriptor (adempiere -> earContent -> META-INF -> application.xml) and make the following modifications:

  • Add in a document type descriptor tag directly before the application tag:
 <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN"
 "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
  • Remove all of the parameters from the application tag.
  • Add the next two lines directly beneath the application tag if they are not already present
 <display-name>ADempiere</display-name>
 <description>ADempiere Applications</description>
  • Remove the following lines completely from the file:
 <module>
   <java>AdempiereSLib.jar</java>
 </module>
 <module>
   <java>Adempiere.jar</java>
 </module>
 <module>
   <java>adempiereApps.jar</java>
 </module>
  • Remove the following completely from the file:
 <module>
   <web>
     <web-uri>posterita.war</web-uri>
     <context-root>/posterita</context-root>
   </web>
 </module>


Open up the deployment descriptor for adempiereApps.war (adempiereApps ->WebContent -> WEB-INF -> web.xml) and make the following modifications:

  • Add in a document type definition tag directly before the web-app tag:
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
  • Remove all of the parameters from the web-app tag


Open up the manifest file for adempiereRoot.jar (adempierRoot_EJB -> ejbModule -> META-INF -> MANIFEST>MF and make the following modifications:

  • Delete the following section:
 Name: META-INF/jaws.xml
 SHA1-Digest: vb2Dx67PF/Qhr9XGrx03Of8tjdw=
  • Delete the following section:
 Name: META-INF/jboss.xml
 SHA1-Digest: FF5ayoXZ7BfYVDld/IMvvHqpvEg=


Delete the following files from the adempiereRoot_EJB -> ejbModule -> META-INF folder:

  • jaws.xml
  • jboss.xml


Open up the deployment descriptor for adempiereRoot.war (adempiereRoot_WEB ->WebContent -> WEB-INF -> web.xml) and make the following modifications:

  • Add in a document type definition tag directly before the web-app tag:
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
  • Remove all of the parameters from the web-app tag


Open up the deployment descriptor for adempiereWebCM.war (adempiereWebCM ->WebContent -> WEB-INF -> web.xml) and make the following modifications:

  • Add in a document type definition tag directly before the web-app tag:
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
  • Remove all of the parameters from the web-app tag
  • Swap the order of the <mime-mapping> and the <welcome-file-list> tags

Open up the deployment descriptor for adempiereWebStore (adempiereWebStore ->WebContent -> WEB-INF -> web.xml) and make the following modifications:

  • Add in a document type definition tag directly before the web-app tag:
 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
  • Remove all of the parameters from the web-app tag
  • Move the mime-mapping tag to above the welcome-file-list tag
  • Delete the Posterita project, including its contents, from the solution.
  • Right Click on the Adempiere Project and select Export -> Ear File. Choose a directory and click finish.
  • Open up the WebSphere Administration Console.
  • Go to Enterprise Applications -> Install New Application
  • Browse for the ear file that was exported from Eclipse and click next
  • Accept the installation options and click Next
  • Select all of the modules to be mapped to the server by ticking all of the boxes and click next.
  • Provide the JNDI names as adempiere/Status and adempiere/Server respectively and click next.
  • Specify the target resource JNDIs as adempiere/Status, adempiere/StatusLocal, adempiere/Status and adempiere/ServerLocal and click next.
  • Accept the default configuration for Map virtual hosts for Web modules by clicking next.
  • A summary will be displayed, click finish.

Troubleshooting

Conflicting context-root

If you have other applications installed on your application server you may experience a conflict if one of them uses / as its context root. To overcome this, change the context-root of adempiereWebCM to /home. This can be done by modifying the application deployment descriptor (adempiere -> earContent -> META-INF -> application.xml) in Eclipse. Find the module for adempiereWebCM.war and change the context root to home, as shown below:

 <module>
   <web>
     <web-uri>adempiereWebCM.war</web-uri>
     <context-root>/home</context-root>
   </web>
 </module>

Export the ear file once again and redeploy. The conflict should no longer occur.