ofbiz 安装以及使用mysql数据库
来源:互联网 发布:怎么找淘宝小二电话 编辑:程序博客网 时间:2024/06/07 00:35
一.安装
安装需要eclipse ,以及eclipse中的javacc和svn插件
svn地址:http://svn.apache.org/repos/asf/ofbiz/branches/release13.07
下载后会报错,在java bulid path 中将missing的移除,并将项目中framework下的entity下的config文件夹加载进来
然后编译json.jj,parser.jj,(右键,compile with javacc),项目就不报错了
二.配置mysql数据库
修改framework下的entity下的config中的entityengine.xml
1.打开注释的mysql
<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"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/>
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>
<!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/> -->
</delegator>
<delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/>
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>
<!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/> -->
</delegator>
<!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant load-demo" before running "ant run-tests" -->
<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
<group-map group-name="org.ofbiz" datasource-name="localderby"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/>
<group-map group-name="org.ofbiz" datasource-name="localmysql"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>
<!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
<group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
<group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/> -->
</delegator>
2.配置连接池(注意配置数据库编码)
<datasource name="localmysql"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
add-missing-on-start="true"
check-pks-on-start="false"
use-foreign-keys="true"
join-style="ansi-no-parenthesis"
alias-view-columns="false"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="utf8"
collate="utf8_general_ci">
<read-data reader-name="tenant"/>
<read-data reader-name="seed"/>
<read-data reader-name="seed-initial"/>
<read-data reader-name="demo"/>
<read-data reader-name="ext"/>
<read-data reader-name="ext-test"/>
<read-data reader-name="ext-demo"/>
<inline-jdbc
jdbc-driver="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1:3306/ofbiz?autoReconnect=true"
jdbc-username="root"
jdbc-password="root"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="250"
time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
and had to set it to -1 in order to avoid this issue.
For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
<datasource name="localmysqlolap"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
add-missing-on-start="true"
check-pks-on-start="false"
use-foreign-keys="true"
join-style="ansi-no-parenthesis"
alias-view-columns="false"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="utf8"
collate="utf8_general_ci">
<read-data reader-name="tenant"/>
<read-data reader-name="seed"/>
<read-data reader-name="seed-initial"/>
<read-data reader-name="demo"/>
<read-data reader-name="ext"/>
<read-data reader-name="ext-test"/>
<read-data reader-name="ext-demo"/>
<inline-jdbc
jdbc-driver="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1:3306/ofbizolap?autoReconnect=true"
jdbc-username="root"
jdbc-password="root"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="250"
time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
and had to set it to -1 in order to avoid this issue.
For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
<datasource name="localmysqltenant"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
add-missing-on-start="true"
check-pks-on-start="false"
use-foreign-keys="true"
join-style="ansi-no-parenthesis"
alias-view-columns="false"
drop-fk-use-foreign-key-keyword="true"
table-type="InnoDB"
character-set="utf8"
collate="utf8_general_ci">
<read-data reader-name="tenant"/>
<read-data reader-name="seed"/>
<read-data reader-name="seed-initial"/>
<read-data reader-name="demo"/>
<read-data reader-name="ext"/>
<read-data reader-name="ext-test"/>
<read-data reader-name="ext-demo"/>
<inline-jdbc
jdbc-driver="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1:3306/ofbiztenant?autoReconnect=true"
jdbc-username="root"
jdbc-password="root"
isolation-level="ReadCommitted"
pool-minsize="2"
pool-maxsize="250"
time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
and had to set it to -1 in order to avoid this issue.
For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
<!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
</datasource>
(注意:要在mysql中新建以上蓝色文字的三个数据库,否在后面ant会报错)
然后找到最外层的build.xml,运行load-demo方法(双击load_demo,右键,run as,ant bulid),会耗时很长时间,耐心点
最后找到framework下的start中(层级比较多)的start.java,run!!!
网址:1.http://localhost:8080/ecommerce (主页)
2.https://localhost:8443/catalog/control/main(后台登录,默认密码:admin,ofbiz)
- ofbiz 安装以及使用mysql数据库
- ofbiz使用mysql数据库
- ofbiz结合mysql安装教程
- mysql安装以及使用
- Mac上安装使用MYSQL以及Navicat数据库管理
- ofbiz连接mysql数据库的方法二
- ofbiz连接mysql并创建独立数据库
- GP数据库安装以及使用
- MySQL安装以及使用教程
- ofbiz mysql
- mysql的安装与简单使用以及myeclipse下与数据库的连接和使用
- Linux安装mysql数据库以及远程连接mysql数据库
- 一步步安装MYSQL数据库以及初始化设置
- 安装Mysql数据库 以及乱码问题解决utf8
- Ubuntu安装MYSQL数据库以及数据知识点
- pycharm安装以及连接mysql数据库
- MySQL数据库一(数据库安装以及数据库的创建)
- OfBiz--安装
- OC学习笔记共享
- 对oracle数据库使用sql脚本进行导入导出
- 信息学奥林匹克竞赛-Pascal的多种退出语句用法
- #import、#include和@class有什么区别?
- SqlBulkCopy快速批量上传大量数据到SqlServer
- ofbiz 安装以及使用mysql数据库
- 在Centos 5.x或6.x上安装RHEL EPEL Repo
- Android webView打不开一些网页的解决办法
- 9.Python标准库_当前进程信息 (os包)
- IOS-10-详谈OC(object-c)深浅复制/拷贝-什么情况下用retain和copy,mutableCopy
- OC方面的基础笔记
- 解决在eclipse中无法查看引用jar包的源码
- 51nod 1294 :修改数组 && HDU 5256:序列变换
- Android -- Facebook -- HashKey的生成