Financials development requires a standalone Rice instance. Here are instructions to setup a standalone rice instance and database to use for development.
Note: Financials will work with an Oracle 11g or greater database. It does not work with the Oracle 12 JDBC driver. If you are using Oracle 12, use the Oracle 11g JDBC driver. These instructions only cover Mysql but should work with Oracle after making the appropriate changes.
You will need to change some Mysql database settings. See Recommended Development Environment Setup for details on making the configuration changes.
These procedures will create 3 databases in MySql:
Login to Mysql as the root user. Run these commands to create the databases, users and permissions.
create database kfs default character set 'utf8' default collate 'utf8_bin'; create database rice default character set 'utf8' default collate 'utf8_bin'; create database unit default character set 'utf8' default collate 'utf8_bin'; create user kfs@localhost identified by 'kfs'; create user kfs@'%' identified by 'kfs'; create user rice@localhost identified by 'rice'; create user rice@'%' identified by 'rice'; create user unit@localhost identified by 'unit'; create user unit@'%' identified by 'unit'; grant all on kfs.* to kfs@localhost; grant all on kfs.* to kfs@'%'; grant all on rice.* to rice@localhost; grant all on rice.* to rice@'%'; grant all on unit.* to unit@localhost; grant all on unit.* to unit@'%'; |
Create a properties file for LiquiRelational to populate the kfs and rice databases. Name the file lr-kfs.properties. Here are the contents:
datasource.driver=com.mysql.jdbc.Driver kfs.datasource.ddl.username=kfs kfs.datasource.ddl.password=${kfs.datasource.ddl.username} kfs.datasource.ddl.url=jdbc:mysql://localhost/${kfs.datasource.ddl.username} rice.datasource.ddl.username=rice rice.datasource.ddl.password=${rice.datasource.ddl.username} rice.datasource.ddl.url=jdbc:mysql://localhost/${rice.datasource.ddl.username} updateDatabaseFullRebuild=true updateDatabaseContext=demo |
Create a properties file for LiquiRelational to populate the unit database. Name the file lr-unit.properties. Here are the contents:
datasource.driver=com.mysql.jdbc.Driver kfs.datasource.ddl.username=unit kfs.datasource.ddl.password=${kfs.datasource.ddl.username} kfs.datasource.ddl.url=jdbc:mysql://localhost/${kfs.datasource.ddl.username} rice.datasource.ddl.username=unit rice.datasource.ddl.password=${rice.datasource.ddl.username} rice.datasource.ddl.url=jdbc:mysql://localhost/${rice.datasource.ddl.username} updateDatabaseFullRebuild=true updateDatabaseContext=unit |
Run LiquiRelational for kfs and rice. Make sure to adjust the paths appropriately. You must be in the root of the financials project when running this.
mvn -DskipTests clean package java -Xmx4g -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*:/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-kfs.properties org.kuali.kfs.sys.datatools.liquirelational.LiquiRelational For Windows (using Command Prompt): java -Xmx4g -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*;/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-kfs.properties org.kuali.kfs.sys.datatools.liquirelational.LiquiRelational |
Run LiquiRelational for the unit test database. Make sure to adjust the paths appropriately. You must be in the root of the financials project when running this.
mvn -DskipTests clean package (you do not need to run this again if you ran it in step 4 without making code changes) java -Xmx4g -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*:/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-unit.properties org.kuali.kfs.sys.datatools.liquirelational.LiquiRelational For Windows (using Command Prompt): java -Xmx4g -classpath ./kfs-web/target/kfs-web/WEB-INF/lib/*;/Users/user/java/drivers/mysql-connector-java-5.1.36.jar -Dadditional.kfs.config.locations=/Path/lr-unit.properties org.kuali.kfs.sys.datatools.liquirelational.LiquiRelational |
bin/setclasspath.sh should have this line added: export JAVA_OPTS=-Dadditional.config.locations=/Users/user/rice/apache-tomcat-7.0.65/rice/rice-config.xml bin/setclasspath.bat should have this line added: set JAVA_OPTS=-Dadditional.config.locations=C:\rice\apache-tomcat-7.0.65\rice\rice-config.xml |
Run catalina.bat run on Windows or catalina.sh run if not.
When tomcats starts up, you can access rice at http://localhost:8081/kr-dev/
Financials will need to know about your Rice instance. You will need to create a properties file and pass the name of that file to Financials using the additional.kfs.config.locations system property. Here is an example of that properties file:
base.url=http://localhost:8080 rice.server.url=http://localhost:8081/kr-dev rice.url=http://localhost:8081/kr-dev rice.ksb.registry.serviceUrl=${rice.url}/remoting/soap/ksb/v2_0/serviceRegistry keystore.file=/Users/user/git/financials/kfs-core/src/main/config/demo/rice.keystore log4j.settings.file=/Users/user/kfs/log4j.properties kfs.datasource.username=kfs kfs.datasource.password=${kfs.datasource.username} kfs.datasource.url=jdbc:mysql://localhost/${kfs.datasource.username} kfs.datasource.validating.query=select 1 kfs.datasource.pool.maxActive=50 kfs.datasource.pool.minIdle=5 kfs.datasource.pool.initialSize=5 kfs.datasource.ddl.url=${kfs.datasource.url} kfs.datasource.ddl.username=${kfs.datasource.username} kfs.datasource.ddl.password=${kfs.datasource.password} rice.datasource.username=rice rice.datasource.password=${rice.datasource.username} rice.datasource.url=jdbc:mysql://localhost/${rice.datasource.username} rice.datasource.validating.query=select 1 rice.datasource.pool.maxSize=50 rice.datasource.pool.minSize=5 rice.datasource.ddl.url=${rice.datasource.url} rice.datasource.ddl.username=${rice.datasource.username} rice.datasource.ddl.password=${rice.datasource.password} updateWorkflowOnStartup=true updateDatabaseOnStartup=true updateDocumentstoreOnStartup=true workflow.path=classpath:org/kuali/kfs/sys/workflow/parent/*.xml,\ classpath:org/kuali/kfs/sys/workflow/child/*.xml,\ classpath:org/kuali/kfs/module/ar/workflow/*.xml,\ classpath:org/kuali/kfs/module/bc/workflow/*.xml,\ classpath:org/kuali/kfs/module/cam/workflow/*.xml,\ classpath:org/kuali/kfs/module/cg/workflow/*.xml,\ classpath:org/kuali/kfs/module/ec/workflow/*.xml,\ classpath:org/kuali/kfs/module/ld/workflow/*.xml,\ classpath:org/kuali/kfs/module/purap/workflow/*.xml,\ classpath:org/kuali/kfs/module/tem/workflow/*.xml |