During the hivedata installation one of the tables created was the CRC_DB_LOOKUP table. The CRC Loader needs to communicate with this table and in order to do this we need to tell it where to find the Hivedata tables. During this step we will define the properties for JDBC connection and the data source lookup in the following CRC Loader configuration files.
You need to know the location of your Hivedata tables. These are owned by the PM cell.
The following properties need to be updated or verified that they are set correctly for your environment:
"driverClassName"
"url"
"username" and "password"
These steps include example configurations for Oracle, PostgreSQL and SQL Server.
1. The CRCLoaderApplicationContext.xml file is located in the following directory: |
YOUR_I2B2_SRC_DIR\i2b2\edu.harvard.i2b2.crc\etc\spring\ |
The location shown above is written for Windows. If you are on a Linux machine the slashes in the path name need to be changed.
|
EXAMPLES: |
Linux Path: /opt/edu.harvard.i2b2.crc/etc/spring/ |
Windows Path: C:\opt\data\edu.harvard.i2b2.crc\etc\spring\ |
2. Open the CRCLoaderApplicationContext.xml file to configure the data source for the CRC Loader |
<bean id="CRCBootstrapDS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:XE" /> <property name="username" value="i2b2hive" /> <property name="password" value="demouser" /> </bean> |
<bean id="CRCBootstrapDS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value=" org.postgresql.Driver " /> <property name="url" value="jdbc:postgresql://localhost:5432/i2b2" /> <property name="username" value="i2b2hive" /> <property name="password" value="demouser" /> </bean> |
<bean id="CRCBootstrapDS" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" /> <property name="url" value="jdbc:sqlserver://localhost:1433" /> <property name="username" value="i2b2hive" /> <property name="password" value="demouser" /> </bean> |
3. Save the changes and close the file. |
These steps include example configurations for Oracle, PostgreSQL and SQL Server.
1. Go to the edu.harvard.i2b2.crc.loader.properties file you still have opened from earlier. |
2. Scroll to the section called Datasource Lookup info. |
3. Set the Datasource Lookup information to reflect the information you entered previously in the CRCLoaderApplicationContext.xml file. |
Oracle Configuration
|
4. Save the changes and close the file. |