这两天折腾死了, 为了安装Opentaps 1.5 差点抓狂, 不过得到群里朋友的帮忙,还是跑起来了.

以下是在安装前的一些文件修改和操作

 1)修改framework\entity\config\entityengine.xml 文件

    a)把<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="localderby"/>(53、54行)的localderby修改为localmysql

    b)把<datasource name="localmysql"  段(314行)做以下修改:

       table_tye="InnoDB"  修改为  Engine="InnoDB"

       character-set="lantin1"  修改为  character-set="utf8"

       collate="lantin1_general_cs"  修改为  collate="utf8_general_ci"

       jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true&amp;useOldAliasMetadataBehavior=true"  中的ofbiz修改为opentaps   //opentaps为创建的数据库名字

       jdbc-username="ofbiz"  和  jdbc-password="ofbiz"  中的ofbiz修改为mysql上创建了的用户名和密码

     c)修改build.properties文件,把里面的内存值减小一半(如果内存是4G以上就不用修改了)

     d)把 \framework\webapp\src\org\ofbiz\webapp\controlfor\ConfigXMLReader.java文件中的 81行  

       for (String a : url.toString().split(File.seperator)) {   中File.seperator修改为 "/"

  e)打开\opentaps\opentaps\opentaps-common\build-aspects.xml文件,将以下三行注释掉

      <jar jarfile="${ofbiz.dir}/framework/entity/build/lib/ofbiz-entity.jar" update="true" basedir="${build.dir}/classes/" includes="META-INF/aop.xml" />

      <jar jarfile="${ofbiz.dir}/framework/common/build/lib/ofbiz-common.jar" update="true" basedir="${build.dir}/classes/" includes="META-INF/aop.xml" />

      <jar jarfile="${ofbiz.dir}/applications/order/build/lib/ofbiz-order.jar" update="true" basedir="${build.dir}/classes/" includes="META-INF/aop.xml" />

      f) 如果Mysql 版本太低,会导致表无法创建, 解决方法如下
  framework\entity\src\org\ofbiz\entity\jdbc下的DatabaseUtil.java
  将createTable方法中的
    if (UtilValidate.isNotEmpty(this.datasourceInfo.tableType)) {
            sqlBuf.append(" TYPE ");
            sqlBuf.append(this.datasourceInfo.tableType);
        }
  中的TYPE修改为ENGINE

   2) cmd命令,到解压后的opentaps目录中,执行ant run-install

      等待10~20分钟,BUILD Successful

   3) 修改startofbiz.bat,把内存值修改为256M,512M,512M(如果是4G内存,则不用改)

   4)CMD>startofbiz.bat

Thanks,
Ivan

 posted on 2011-08-17 17:15  兰猫-兰兰  阅读(2877)  评论(0编辑  收藏  举报