Opentaps + Oracle 安装

Opentaps + Oracle 安装
默认Opentaps是基于derby的安装,这个在实际生产环境是不太可能会使用的。往往我们会实际需要使用Oracle作为生产数据库。很多人问我怎么去修改Opentaps与Oracle的支持。修改方法如下:

1、编辑 framework/entity/config/entityengine.xml,修改default delegate为 localoracle

< delegator name ="default" entity-model-reader ="main" entity-group-reader ="main" entity-eca-reader ="main" distributed-cache-clear-enabled ="false" >
< group-map group-name ="org.ofbiz" datasource-name ="localoracle" />
< group-map group-name ="org.ofbiz.olap" datasource-name ="localoracle" />
< group-map group-name ="org.ofbiz.tenant" datasource-name ="localoracle" />
< group-map group-name ="org.opentaps.analytics" datasource-name ="localoracle" />
< group-map group-name ="org.opentaps.testing" datasource-name ="localoracle" />
</ delegator >


2、修改同个文件中的的localoracle 的datasource节点
     < datasource name = " localoracle "
            helper
- class = " org.ofbiz.entity.datasource.GenericHelperDAO "
            schema
- name = " OFBIZ "
            field
- type - name = " oracle "
            check
- on - start = " true "
            add
- missing - on - start = " true "
            alias
- view - columns = " false "
            join
- style = " ansi " >
        
< read - data reader - name = " seed " />
        
< read - data reader - name = " seed-initial " />
        
< read - data reader - name = " demo " />
        
< read - data reader - name = " ext " />
        
< inline - jdbc
                jdbc
- driver = " oracle.jdbc.driver.OracleDriver "
                jdbc
- uri = " jdbc:oracle:thin:@127.0.0.1:1521:orcl "
                jdbc
- username = " ofbiz "
                jdbc
- password = " ofbiz "
                pool
- minsize = " 2 "
                pool
- maxsize = " 250 "
                time
- between - eviction - runs - millis = " 600000 " />
    
</ datasource >

3、将{ORACLE_HOME}\product\10.2.0\db_1\jdbc\lib目录下的ojdbc14.jar拷贝到framework/entity/lib/jdbc目录下

4、重新运行ant run-install生成数据库对象

5、现在Oracle数据库已经就绪OK啦


你可能感兴趣的:(Opentaps + Oracle 安装)