r1 - 18 Dec 2006 - 12:22:50 - RandyLetnessYou are here: OSAF >  Journal Web  >  ContributorNotes > RandyLetnessNotes > CosmoOracleConfiguration
In order to get Cosmo to run against an Oracle 10g database I had to do the following:

  • rename "uid" columns in Item and User to "uuid" as "uid" is reserved in Oracle
  • change maximum length of CalendarPropertyIndex.value to 4000 as Oracle's varchar has a 4000 char limit
  • update DefaultCalendarIndexer with 4000 char limit on the property value length
  • change the default namespace in QName to be "org.osaf.cosmo.default" so that its not just an empty string. Oracle treats empty string as NULL and there is a not null constaint that blows up.
  • change the defaultLobHandler bean definition in applicationContext.xml to be:
    <bean id="nativeJdbcExtractor"
     class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"/>
    <bean id="defaultLobHandler"
          class="org.springframework.jdbc.support.lob.OracleLobHandler">
          <property name="nativeJdbcExtractor" ref="nativeJdbcExtractor"/>
    </bean>
  • edit cosmo.properties and set cosmo.hibernate.dialect to org.hibernate.dialect.OracleDialect
  • download Oracle JDBC driver (classes12.jar) from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html and copy to osaf-server-bundle-0.6-SNAPSHOT/tomcat/common/lib
  • edit osaf-server-bundle-0.6-SNAPSHOT/tomcat/conf/server.xml and configure the Resource element for the database to be:
       <Resource name="osafsrv/db"
             type="javax.sql.DataSource"
             maxActive="100"
             maxIdle="30"
             maxWait="10000"
             username="user"
             password="pass"
             defaultAutoCommit="false"
             driverClassName="oracle.jdbc.driver.OracleDriver"
             url="jdbc:oracle:thin:@servername:1521:dbname"/>

-- RandyLetness - 18 Dec 2006

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.