You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Apache OODT XMLPS is an extensible, configurable product and profile server that easily exposes DBMS-backed repositories and catalogs, respectively.

XMLPS grew out of the EDRN Informatics Center and its EDRN Resource Network Exchange (ERNE) project.

Here's a quick step guide to getting XMLPS up and running on your project.

Get Apache OODT Web-Grid up and Running

To get started with Apache OODT XMLPS, you'll need to install Apache OODT Web Grid.

  1. svn export http://svn.apache.org/repos/asf/oodt/tags/0.5/grid
  2. cd grid
  3. mvn install (builds target/web-grid-0.5.war)

You're done here for now, let's go grab Apache Tomcat.

Grab Apache Tomcat and get it up and running

Grab Apache Tomcat. I prefer the 5.5.x series. For those 6.x and 7.x fanboys, instructions will likely be similar.

  1. curl -O http://apache.petsads.us/tomcat/tomcat-5/v5.5.36/bin/apache-tomcat-5.5.36.tar.gz
  2. mv apache-tomcat-5.5.36.tar.gz /usr/local
  3. cd /usr/local ; tar xzvf apache-tomcat-5.5.36.tar.gz
  4. ln -s /usr/local/apache-tomcat-5.5.36 tomcat5
  5. edit /usr/local/tomcat5/conf/tomcat-users.xml and add a new user "xmlps" with password "secret" with the roles="manager,admin"

You're done for now with the Tomcat installation. Time to layer the web-grid substrate on top of it.

Layering Apache OODT Web Grid on top of Tomcat

  1. copy web-grid-0.5.war from the target directory from your built Web-Grid to /usr/local/tomcat5/webapps/grid.war (yes rename it, you'll thank me later)

    Warning

    Make sure Tomcat isn't running until the guide says for you to turn it on. Tomcat doesn't like you messing with its webapp and work directories.

Building and Installing XMLPS

  1. svn export http://svn.apache.org/repos/asf/oodt/tags/0.5/xmlps
  2. cd xmlps
  3. mvn install assembly:assembly (builds target/oodt-xmlps-0.5-with-dependencies.jar)
  4. create deploy area, e.g., /usr/local/xmlps and copy oodt-xmlps-0.5-with-dependencies.jar to it
  5. copy example conf files out of xmlps/src/main/conf (example.db.properties and example-ps.xml) into /usr/local/xmlps

Set up a database

Let's assume you have installed MySQL. There are plenty of guides out there to do so (including the one I just linked to) for specific operating systems, etc. So assuming that you have MySQL already installed, let's create a quick database and sample schema and user.

  1. Create a MySQL database with user xmlps and password xmlps and add some sample data.
    CREATE DATABASE xmlps;
    GRANT ALL PRIVILEGES ON xmlps.* TO 'xmlps'@'localhost' IDENTIFIED BY 'xmlps';
    GRANT ALL PRIVILEGES ON xmlps.* TO 'xmlps'@'%' IDENTIFIED BY 'xmlps';
    
  2. Log on to MySQL with user xmlps
    mysql -u xmlps xmlps -p
    
    (enter password "mysql")
  3. Create a simple data product schema
    CREATE TABLE products (product_id int auto_increment NOT NULL PRIMARY KEY, product_name varchar(255));
    
  4. INSERT 2 rows of data into the table
    INSERT INTO products (product_name) VALUES ('Test1');
    INSERT INTO products (product_name) VALUES ('Test2');
    

Download the MySQL connector JAR and install it

You can grab version 5 of the MySQL JAR connector and it should work fine. If it doesn't, grab one of the appropriate versions for your MySQL DB.

  1. curl -O http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar

Now you have to unzip grid.war that you installed in Tomcat, and install the JDBC driver to its WEB-INF/lib directory

  1. cd /usr/local/tomcat5/webapps/ ; unzip grid.war

Now copy the JDBC jar file to the unzipped grid's WEB-INF/lib directory

  1. cp mysql-connector-java-5.1.6.jar /usr/local/tomcat5/grid/WEB-INF/lib

Startup and visit your Tomcat server

OK it's actually time to start Tomcat.

  1. cd /usr/local/tomcat5/bin ; ./startup.sh

Now visit http://localhost:8080/grid/

  1. Configure web-grid after logging in to use XMLPS handler, to reference your JDBC jar file (that you copy into /usr/local/xmlpstest), and to reference XMLPS jar file in /usr/local/xmlpstest
  2. try a query at: http://localhost:8080/grid/prod?q=

Other Relevant Reading

  1. Mattmann's original guide for XMLPS (12 steps)
  • No labels