uP101 Database Configuration

An element of the uP101 pre-conference seminar

This page is not intended to be a general documentation of uPortal configuration. It is the specific ramblings that will be presented at the JA-SIG Vancouver uPortal 101 pre-conference seminar.

I. Start the database and verify that uPortal is configured to connect to it.

  1. Go to the demo directory under hsqldb and run the runServer script (bat or sh) with the parameter -port 8887.
    runServer -port 8887
    
  2. Look at rdbm.properties for the connection definition to hsqldb.  It is already set up to connect to hsqldb and includes comments for using other databases.
  3. Right click build.xml again and select the target "dbtest". This should connect to the running hsqldb you just started and print out information about the database characteristics. 
    sample DbTest output

    Buildfile: K:\uPortal-101\workspace\uP101-writeable\build.xml
    prepare:
    compile:
    dbtest:
    echo Invoking DbTest
    java Database name: 'HSQL Database Engine'
    java Database version: '1.8.0'
    java Driver name: 'HSQL Database Engine Driver'
    java Driver version: '1.8.0'
    java Driver class: 'org.hsqldb.jdbcDriver'
    java Connection URL: 'jdbc:hsqldb:hsql://localhost:8887'
    java User: 'sa'
    java supportsANSI92EntryLevelSQL: false
    java supportsANSI92FullSQL: false
    java supportsCoreSQLGrammar: true
    java supportsExtendedSQLGrammar: false
    java supportsTransactions: true
    java supportsMultipleTransactions: true
    java supportsOpenCursorsAcrossCommit: false
    java supportsOpenCursorsAcrossRollback: false
    java supportsOpenStatementsAcrossCommit: true
    java supportsOpenStatementsAcrossRollback: true
    java supportsStoredProcedures: true
    java supportsOuterJoins: true
    java supportsFullOuterJoins: false
    java supportsLimitedOuterJoins: true
    java supportsBatchUpdates: true
    java supportsColumnAliasing: true
    java supportsExpressionsInOrderBy: true
    java supportsOrderByUnrelated: true
    java supportsPositionedDelete: false
    java supportsSelectForUpdate: false
    java supportsUnion: true
    java supportsUnionAll: true
    java getMaxColumnNameLength: 0
    java getMaxColumnsInIndex: 0
    java getMaxColumnsInOrderBy: 0
    java getMaxColumnsInSelect: 0
    java getMaxColumnsInTable: 0
    java getMaxConnections: 0
    java getMaxCursorNameLength: 0
    java getMaxIndexLength: 0
    java getMaxRowSize: 0
    java getMaxStatements: 0
    java getMaxTableNameLength: 0
    java getMaxTablesInSelect: 0
    java getMaxUserNameLength: 0
    java getSearchStringEscape: \
    java Table Types: GLOBAL TEMPORARY,SYSTEM TABLE,TABLE,VIEW
    java SQL Types:
    TINYINT,BIGINT,LONGVARBINARY,VARBINARY,BINARY,LONGVARCHAR,CHAR,NUMERIC,DECIMAL,INTEGER,SMALLINT,FLOAT,REAL,
    DOUBLE,VARCHAR,VARCHAR_IGNORECASE,BOOLEAN,DATE,TIME,TIMESTAMP,OTHER
    BUILD SUCCESSFUL

II Run "initportal"

Once again, right click build.xml and choose initportal.  This will connect to the database and intialize it.  The table definitions and data are in xml files under properties/db in the files tables.xml and data.xml.  There is one additional configuration file here, dbloader.xml, which may need to be modified for a database that uPortal has not yet encountered.  Chances are, you won't need to do anything because the required mappings for common database products are already there.