JApex Installation and Configuration

The following document should walk you through your fist steps with JApex.

Prerequisites

The following document assumes you have a very basic understanding of what is Java, and that you have successfully downloaded and installed the following pieces of software

  • J2SDK, version 1.6.x or later. grab the latest version here
  • A modern servlet container: e.g. Tomcat servlet Container version 6.0.20 or later. You can download a distribution of Tomcat here.

Step 1: Download JApex and extract it to a local folder

If you haven't already, please grab a JApex distribution package from here. Once you download and decompress the package, you should find the following files included

  • japex-x.y-version.war : this is the JApex Application itself. in the following section I will walk you through the steps necessary to install and run it.
  • japex-report.sql : a sample DDL script to create report storage table. nothing fancy, just the basic requirements for basic operation.

    the script doesn't explicitly specify a schema for the objects, if your application uses a single schema, or you plan to have JApex Report storage objects coexist with your business objects, this should be fine.

    please feel free to modify the name of the objects as you see fit, please refer to the section HERE on samples on possible modifications.

Step 2: Installing JApex

If you run Tomcat with its default settings, installation should be as simple as:

  • Start your tomcat instance if you haven't already. make sure your can see the window of tomcat (or its logs tailed) during the following steps
  • change to your Tomcat base directory (AKA CATALINA_HOME) and into webapps directory
  • rename the web archive file you extracted earlier japex-x.y-version.war into simple japex.war
  • Copy the web archive japex.war from the apex distribution extraction directory mentioned above into the webapps directory
  • Immediately tomcat should pickup that you pasted the file into its "Deployment directory" and will immediately begin automatic extraction and installation
  • You can tell whether the installation completed by opening your browser and navigating to your http://tomcat hostname or ip:tomcat port/japex/. of course replace tomcat hostname or ip and tomcat port with your actual server ip (usually localhost or 127.0.0.1) and port (by default it's (8080). If every thing went fine you should get a blank white page with the following message on it

    figure

    That's it, japex has been installed, let's move to step 3 configuration

Step 3: Configuring JApex, connecting JApex to your database.

connecting JApex to your database is simply a matter of defining few connection parameters in a simple text file and restarting your tomcat.

continuing from step to, while you're at the CATALINA_HOME/webapps directory, and after tomcat installs japex.war, you should now find a new created folder called "japex". this is the contents of the web archive extracted by Tomcat.

  • browse to the folder CATALINA_HOME/webapps/japex/WEB-INF/spring
  • locate the file database.properties
  • open the file using your favorite text editor
  • in a fresh installation the contents should look like this:
    # as always, parsing schema defaults to the user name used to connect to DB 
    db.username=japex
    db.password=japexpass
    # unless you're using JApex to connect to databases other than Oracle (;-))
    #   you don't need to change that
    db.driver.classname=oracle.jdbc.driver.OracleDriver
    # the url is in the format
    #  jdbc:oracle:thin:@<SERVER_NAME OR SERVER_IP>:<PORT>:<SID>
    db.url=jdbc:oracle:thin:@10.1.1.123:1521:XE

    The parameters are really self explanatory, and the file mentions all what is needed to modify.

  • Please take the time to modify the parameters as described. save the file. and restart tomcat.

    that's it, you have now configured japex.