The Apache DB Project
ObJectRelationalBridge

OJB

Downloads

Documentation

Development

Translated (Web)

Quick Start
  1. Be sure to have a JDK 1.2 or higher installed !
    The environment variable JAVA_HOME must point to the base directory of your JDK. For example:
    set JAVA_HOME=C:\jdk1.3
  2. Unpack the latest db-ojb-XXX-src.tgz (source) or db-ojb-XXX.tgz (binary) snapshot to a directory <path> of your choice. A directory <path>/db-ojb-XXX containing the unpacked source or binary distribution will be created.
  3. OJB depends on several jar files that can not be shipped with the distribution for legal reasons. Please download them and place them in the <path>/db-ojb-XXX/lib directory.
    Jar archivehow to get it
    j2ee.jarPlease get it from http://java.sun.com/j2ee/
    jdo.jar
    (for the OjbStore JDORI Plugin only)
    Please get it from http://java.sun.com/products/jdo
    jdori.jar
    (for the OjbStore JDORI Plugin only)
    Please get it from http://java.sun.com/products/jdo
    jndi.jar (for JDK1.2 only)Please get it from http://java.sun.com/
    proxy.jar (for JDK1.2 only)Please get it from http://sf.net/projects/objectbridge/
  4. In a terminal window (or dos box under Win32) change to the OJB installation directory <path>/db-ojb-XXX.
    Under linux/Unix it may be neccessary to grant execution permission to the shell scripts by chmod u+x bin/*.sh.
  5. To check if OJB runs properly out of the box execute bin\build junit under Win32 and bin/build.sh junit under Unix/Linux.
    This will launch the OJB regression test suite. If all tests are passed the console output looks like follows:
    junit:
        [junit] Running org.apache.ojb.broker.AllTests
        [junit] [BOOT] INFO: OJB.properties: file:
        <path>/db-ojb-XXX/target/test/ojb/OJB.properties
        [junit] Tests run: 115, Failures: 0, Errors: 0, Time elapsed: 11,023 sec
        [junit] Running org.apache.ojb.odmg.AllTests
        [junit] [BOOT] INFO: OJB.properties: file:
        <path>/db-ojb-XXX/target/test/ojb/OJB.properties
        [junit] Tests run: 122, Failures: 0, Errors: 0, Time elapsed: 14,876 sec
        [junit] Running org.apache.ojb.soda.AllTests
        [junit] [BOOT] INFO: OJB.properties: file:
        <path>/db-ojb-XXX/target/test/ojb/OJB.properties
        [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 6,417 sec
          
          

    It is of course possible to use ANT directly instead of our build scripts. If you want to do this you have to place xalan.jar and junit.jar into the ANT lib directory.

  6. have a look at the tutorials to learn how to use OJB: tutorial1, tutorial2, tutorial3 and tutorial4.
  7. If you want to learn how to use OJB for your specific RDBMS please see this document.
  8. deployment of OJB within your application is described here.

Copyright © 1999-2003, Apache Software Foundation