Professional Documents
Culture Documents
Software Configuration
Software Configuration
Software Configuration
Configuration
LECOM (C115758)
Copyright Notice
This document contains proprietary information of HCL Technologies Ltd. No part of this document may
be reproduced, stored, copied, or transmitted in any form or by means of electronic, mechanical,
photocopying or otherwise, without the express consent of HCL Technologies. This document is intended
for internal circulation only and not meant for external distribution.
Revision History
Versio
n No.
Date
Prepared by /
Modified by
Significant Changes
0.1
Initial Draft
0.2
Review
Verification
Software Configuration
Page 1
LECOM (C115758)
Blinke Software
Configuration
TABLE OF CONTENTS
1.
Introduction.......................................................................................................... 3
2.
3.
Software Versions................................................................................................. 3
4.
5.
6.
Summary.............................................................................................................. 8
1.
Software Configuration
Page 2
LECOM (C115758)
Blinke Software
Configuration
1. Introduction
This document describes the Software required and Configuration to be done by a new joinee.
3. Software Versions
S.
No
1
2
3
Software
Version
MySQL
MySQL JDBC driver
OfBiz
mysql-5.5.23-winx64
mysql-connector-java-5.1.14-bin.jar
apache-ofbiz-10.04
Software Configuration
Page 3
LECOM (C115758)
Blinke Software
Configuration
Following are the the steps for Migrating OfBiz from Derby to MySQL database
Step I
C:\mysql-5.5.23-winx64\bin>mysql -u root
mysql>create user ofbiz;
mysql>create user ofbizolap;
mysql>create user ofbiztenant;
mysql>use mysql;
mysql>select database();
mysql>update user set password=PASSWORD("ofbiz") where User='ofbiz';
mysql>update user set password=PASSWORD("ofbizolap") where User='ofbizolap';
mysql>update user set password=PASSWORD("ofbiztenant") where User='ofbiztenant';
Note: You can create a user with password using a single command e.g. CREATE USER ofbiz IDENTIFIED
BY PASSWORD 'ofbiz';
mysql>grant all privileges on *.* to 'ofbiz'@localhost identified by 'ofbiz';
mysql>grant all privileges on *.* to 'ofbizolap'@localhost identified by 'ofbizolap';
mysql>grant all privileges on *.* to 'ofbiztenant'@localhost identified by 'ofbiztenant';
Step-II
Stop OfBiz server
Edit entityengine.xml as follows:
1. Add the following datasources below the datasource 'localmysql'
<datasource name="localmysqlolap"
helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
field-type-name="mysql"
check-on-start="true"
Software Configuration
Page 4
LECOM (C115758)
Blinke Software
Configuration
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="latin1"
collate="latin1_general_cs">
<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="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
jdbc-username="ofbizolap"
jdbc-password="ofbizolap"
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" isolationlevel="Serializable"/> -->
</datasource>
Software Configuration
Page 5
LECOM (C115758)
Blinke Software
Configuration
<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="latin1"
collate="latin1_general_cs">
<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="com.mysql.jdbc.Driver"
jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
jdbc-username="ofbiztenant"
jdbc-password="ofbiztenant"
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.
Software Configuration
Page 6
LECOM (C115758)
Blinke Software
Configuration
<!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must
run "ant run-install" before running "ant run-tests" -->
<delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-ecareader="main">
<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"/>
</delegator>
3. Save this file
Step -III
Software Configuration
Page 7
LECOM (C115758)
Blinke Software
Configuration
Following are the steps to setup debug and run from eclipse.
Select OFBiz project, right-click on it -> Run As -> Run ... (alike for Debug)
Select Java Application and click on New
Set Run configuration name to OFBiz
Main tab:
Project: OFBiz
If you need it (to trace a framework bug in the 1st loaded class) you may use the "Stop in
Main" Option
Arguments:
Don't forget to remove the entry "ofbiz (default classpath)" else you may have a message
"Can't find bundle for base name cache, locale ..."
Source tab
Environment
nothing
Click on Apply and Run (or Debug)
6. Summary
This document summarizes the various Configuration Required for A new Joinee.
Software Configuration
Page 8