DiGIR Portal

Installation Instructions

This document is provided as a guide to setting up a DiGIR Portal. The implementation discussed is the Java implementation currently under the CVS repository at SourceForge and containing the following packages:

The instructions cover both the setup for simply running a portal as well as the setup for those interested in doing additional portal development work, although the primary focus is on the former.

You will want to be familiar with the overall portal architecture. In brief, the portal is made up of two layers: the presentation layer and the engine (which may be thought of as a dispatcher). Each of these layers runs as its own application, or in specific, each as its own web application under its own Tomcat instance. Communication between each layer is via HTTP and allows for someone to run only one layer, if he/she so chooses, and communicate with the "missing" layer running elsewhere. For further information, please visit the DiGIR Site hosted on SourceForge.

Now, down to business...

Software Setup

  1. Download and install the latest version of Java 2. You must have at least version 1.4 of the JDK. At the time of writing, the version used in development and testing was Java 2 SDK 1.4.0. The portal has undergone additional development using and is deemed to be supported by Java 2 SDK 1.4.1 and Java 2 SDK 1.4.2_02.

    Java 2 is available here.

    Follow the instructions available for installing the downloaded package. Be sure to do the following:
    • Set the JAVA_HOME environment variable to the location of your Java 2 install (e.g. C:\j2sdk1.4.x). This should be done in a permanent fashion.
    • Modify your PATH environment varialbe to include the Java 2 bin directory (e.g. C:\j2sdk1.4.x\bin). Again, this should be done in a permanent fashion.

  2. Download and install at least version 4.0.3 of Jakarta Tomcat. Do not install a version earlier than 4.x or you will definitely have compatibility issues. At the time of writing, the versions used in development and testing include 4.0.3 and 4.0.4. The portal has undergone additional development using and is deemed to be supported by Tomcat 4.0.5, 4.0.6 and 4.1.29. Tomcat 4.1.29 is Apache's current production quality release. At this time, Tomcat 5.x is still in beta and will not run the portal applications as released.

    Jakarta Tomcat is available here.

    Follow the instuctions available for installing the downloaded package. Be sure to do the following:
    • Set the CATALINA_HOME environment variable to the location of the Tomcat install (e.g. C:\jakarta-tomcat-4.0.3). This should be done in a permanent fashion.

  3. Download the DiGIR environment ZIP file. This file establishes a basic directory structure for DiGIR as well as provides you with a number of configuration files required for Tomcat.

    The DiGIR environment ZIP is available here.

    Once you have downloaded this file, unzip it, preferably at C:\, but this is not required. After unzipping, be sure to:
    • Set a DIGIR_HOME environment variable to the location of the install (e.g. C:\DiGIR). Again, this should be done in a permanent fashion.
    A brief overview of the directory structure is as follows:

    Directory Description
    /DiGIR/docs Directory for documentation. Developers who generate the javadoc will find the generated API javadoc here.
    /DiGIR/lib Directory containing .jar files of required libraries. These .jar files are provided in the ZIP file so as to maintain a notion of compatiblity for development. The libraries include, but are not limited to: servlet.jar, soap.jar, uddi4j.jar, xalan.jar, xerces.jar, xml-apis.jar, log4j-1.2.8.jar, commons-logging-api.jar, commons-logging.jar, commons-httpclient-2.0.jar.
    /DiGIR/logs Directory where application logs are written (i.e. portal_services.log and presentation.log).
    /DiGIR/src Directory in which a developer should establish their CVS repository and work with the code. Do not be concerned if the directory is empty and remains that way if you are not doing development.
    /DiGIR/tcinstance Directory containing setup and configuration for running the various layers of the Portal. You will find at least and engine and pres subdirectory here, each containing a bin, conf, logs, webapps, work, and temp directory. The directory structure within each tcinstance directory, as well as the configuration files, are required by Tomcat for a Tomcat instance to run.

  4. Download the latest web application archive (.war) files for the portal application. Each layer, as discussed above, is its own web application and therefore has its own archive. You may choose to run either the presentation layer, the engine, or (probably) both.

    The released DiGIR Web Application archives (.war) files are available here.

    After downloading the files, you may need to rename them appropriately back to *.war as an extension (likely .zip) may be appended upon download. This does not harm the file contents.

    • If you have downloaded the engine archive (DiGIR_portal_engine.war), place the file in the following directory:

      %DIGIR_HOME%/tcinstance/engine/webapps

      Then unpack the file as follows:

      jar xvf DiGIR_Portal_Engine.war

      This will create a WEB-INF directory containing a directory of java classes and a directory of libraries. Navigating the tree should yield an install of the following packages:

      • org.calacademy.digir.common
      • org.calacademy.digir.engine
      • org.calacademy.digir.util

      You will need to remove the .war file from the webapps directory, otherwise it may interfere with the running web application.

    • If you have downloaded the presentation layer archive (DiGIR_portal_pres.war), place the file in the following directory:

      %DIGIR_HOME%/tcinstance/pres/webapps

      Then unpack the file as follows:

      jar xvf DiGIR_Portal_Pres.war

      This will create a WEB-INF directory containing a directory of java classes and a directory of libraries. It will also create some miscellaneous front end files. Navigating the tree should yield an install of the following java packages:

      • org.calacademy.digir.common
      • org.calacademy.digir.presentation
      • org.calacademy.digir.util

      You will need to remove the .war file from the webapps directory, otherwise it may interfere with the running web application.

    Because the configuration files are contained within the archives, they must be unpacked so that you can make configuration changes (as directed below).

Software Configuration

Running the Software

Troubleshooting

Note for Java 2 SDK 1.4.2 Users
This version of the SDK packages a Xalan library within it that conflicts with the portal software (and many other applications freely available). Sun packaged Xerces and Xalan with the JDK to spread adoption but unfortunately they have not packaged the latest releases of such. Therfore, if you are using version 1.4.2 of the SDK (and perhaps other 1.4.x versions) you may need to do the following:

copy xalan.jar found in %DIGIR_HOME%/lib to %CATALINA_HOME%/common/endorsed

This "endorses" the more recent xalan.jar for the class loader when you run the portal applications. Older versions of Tomcat (pre 4.1.?) may not offer an endorsed directory, therefore if you are encountering problems and need to take this step, upgrade to a 4.1.x version of Tomcat. If it is unclear whether you need to take this step, it will become obvious when you attempt to make a query once your portal is up and running and you receive this error on an error page or in the presentation layer's application log (presentation.log):

Unexpected error. (org.apache.xml.utils.WrappedRuntimeException: The output format must have a '{http://xml.apache.org/xalan}content-handler' property!)

Log configuration
If you're not seeing any output in the portal_services.log file, check the property log4j.appender.F.File in:

%DIGIR_HOME%/tcinstance/engine/webapps/WEB-INF/classes/log4j.properties

Tomcat resource location
When testing the portal engine, if you're getting:

HTTP status 404 Apache Tomcat error: The requested resource (/portal/PortalServlet) is not available.

Then you may want to check the docBase attribute inside the Tomcat Root Context element in:

%DIGIR_HOME%/tcinstance/engine/conf/server.xml

If you did not install your portal directly under the root directory of your file system, then you'll probably need to change "/" by "" in the docBase attribute.