Setting Up the Rice Application

Deploying the WAR file

Copy the kr-dev.war file from the base directory of the server distribution to the directory that contains web applications in your servlet container. For Apache Tomcat 5.5.x, this is [Tomcat-root-directory]/webapps.

Setting Up the Database JDBC Drivers for Tomcat

Copy the database-specific JDBC driver to the [Tomcat-root-directory]/common/lib.

  • Login as the root user:

    su – rice
  • MySQL

    cp -p /java/drivers/mysql-connector-java-5.1.5-bin.jar /usr/local/tomcat/common/lib
  • Oracle

    cp -p /java/drivers/ojdbc14.jar /usr/local/tomcat/common/lib

Configuring the rice-config.xml File

By default when it starts, Rice attempts to read the rice-config.xml configuration file from the paths in this order:

  1. /usr/local/rice/rice-config.xml

  2. ${rice.base}../../../conf/rice-config.xml

  3. ${rice.base}../../conf/rice-config.xml

  4. ${additional.config.locations}

The value for rice.base is calculated using different locations until a valid location is found. Kuali calculates it using these locations in this sequence:

  1. ServletContext.getRealPath("/")

  2. catalina.base system property

  3. The current working directory

An example rice-config.xml file is included in the server distribution under web/src/main/config/example-config

To get the rice-config.xml and other Rice configuration files into their correct locations, follow these steps:

  • Login as root:

    mkdir /usr/local/rice
    chown rice:rice /usr/local/rice
    chmod 755 /usr/local/rice
    cd /opt/software/kuali/src/rice-release-1-0-2-br/web/src/main/config/example-config/
    cp -p rice-config.xml /usr/local/rice
    cp -p log4j.properties /usr/local/rice
    cd /usr/local/rice
    chown rice:rice log4j.properties
    chown rice:rice rice-config.xml
    su - rice 
    cd /usr/local/rice

    Modify the database parameters in the rice-config.xml file. The values should conform to the values you used with the ImpEx tool (listed in the impex-build.properties file).

    datasource.url=jdbc:mysql://localhost:3306/rice
    datasource.username=rice
    datasource.password=kualirice
    datasource.url=jdbc:mysql://remoteMySQLServerComputerName:3306/rice
    datasource.username=rice
    datasource.password=kualirice

    If you are using Oracle, the JDBC URL will have this general form:

    datasource.url=jdbc:oracle:thin:@remoteMySQLServerComputerName:1521:ORACLE_SID

    At this point, you are ready to try to bring up the Tomcat server with the Rice web application:

    cd /usr/local/tomcat/bin
    ./startup.sh
  • Check if Tomcat and Rice started successfully:

    cd /usr/local/tomcat/logs
    tail -n 500 -f catalina.out

    If your Rice server started up successfully, browse to the site http://yourlocalip:8080/kr-dev. You should see the Rice portal screen which will look something like this:

    Figure 4.1. Rice Portal Main Menu

    Rice Portal Main Menu

Parameters

The tables below have the basic set of parameters for rice-config.xml that you need to get an instance of Rice running. Please use these tables as a beginning reference to modify your rice-config.xml file.

Warning

Make sure the application.url and database user name and password are set correctly.

Table 4.3. Core

ParameterDescriptionExamples or Values
application.url The external URL used to access the Rice web interface; edit only the fully-qualified domain name and port of the server http://yourlocalip:8080/kuali-rice-url
app.context.nameContext name of the web application
  • Essentially, the name of the WAR file

  • Used to build the path for images and help URLs

kuali-rice-url (This value should not be changed)
log4j.settings.path Path to log4j.properties file. If the file does not exist, you must create it./usr/local/rice/log4j.properties
log4j.settings.reloadIntervalinterval (in minutes) to check for changes to the log4j.properties file5
mail.smtp.hostSMTP host name or IP (This param is not in the default config.) localhost
config.locationLocation of configuration file to load environment-specific configuration parameters (This param is not in the default config.) /usr/local/rice/rice-config-${environment}.xml
sample.enabledEnable the sample applicationboolean

Table 4.4. Database

ParameterDescriptionExamples or Values
datasource.ojb.platform Name of OJB platform to use for the database Oracle9i or MySQL
datasource.platform Rice platform implementation for the database
  • org.kuali.rice.core.database.platform.DerbyPlatform

  • org.kuali.rice.core.database.platform.OraclePlatform

  • org.kuali.rice.core.database.platform.MySQLPlatform

datasource.driver.name JDBC driver for the database
  • org.apache.derby.jdbc.EmbeddedDriver,

  • oracle.jdbc.driver.OracleDriver

  • com.mysql.jdbc.Driver

datasource.username User name for connecting to the server database rice
datasource.password Password for connecting to the server database  
datasource.url JDBC URL of database to connect to
  • jdbc:oracle:thin:@localhost:1521:XE

  • jdbc:mysql://localhost:3306/kuldemo

datasource.pool.minSize Minimum number of connections to hold in the pool an integer value suitable for your environment
datasource.pool.maxSize Maximum number of connections to allocate in the pool an integer value suitable for your environment
datasource.pool.maxWait Maximum amount of time (in ms) to wait for a connection from the pool 10000
datasource.pool.validationQuery Query to validate connections from the database select 1 from dual

Table 4.5. KSB

ParameterDescriptionExamples or Values
serviceServletUrl URL that maps to the KSBDispatcherServlet (include a trailing slash); This param is not in the default config.  
keystore.file Path to the keystore file to use for security /usr/local/rice/rice.keystore
keystore.alias Alias of the standalone server's key see section entitled Generating the Keystore
keystore.password Password to access the keystore and the server's key see section entitled Generating the Keystore

Table 4.6. KEN

ParameterDescriptionExamples or Values
notification.basewebappurl Base URL of the KEN web application (This param is not in the default config.)  

Table 4.7. KEW

ParameterDescriptionExamples or Values
workflow.url URL to the KEW web module${application.url}/kew
plugin.dir Directory from which plugins will be loaded /usr/local/rice/plugins
attachment.dir.location Directory where attachments will be stored (This param is not in the default config.)