Software Configuration

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Blinke Software

Configuration

LECOM (C115758)

Blinke - Software Configuration for New Joinee


Date: 26/6/2012
Project Name: LeCom

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.

Ofbiz Setup and Study.......................................................................................... 3

3.

Software Versions................................................................................................. 3

4.

Migrating OfBiz from Derby to MySQL database..................................................3

5.

Debugging (or running) OFBiz in Eclipse..............................................................7

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.

2. Ofbiz Setup and Study


Raise remedy in tarmac for the following softwares:

i. Remedy for SVN svn://10.98.10.132/Multi-Channel-Commerce-CoE


ii. Remedy for PM Smart
iii. Remedy for Java_home
iv. Tarmac TortoiseSVN,MySQL,DBVisualizer

For setup and Study Do the followings :


i
ii
iii
iv
v

Copy Ofbiz(apache-ofbiz-10.04) from \\DS-D027881045BF\ofbiz_share .


Setup project in eclipse ( take help from Vinita and Bipin).
Set up debug in eclipse ( using attached document).
Study Ofbiz ( what is it, how to run it , etc) from 2 books in above share location.
Understand flow of how to save data from frontend to tables.

3. Software Versions

Following are the software versions to be used.

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

4. Migrating OfBiz from Derby to MySQL database

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

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>
2. Replace derby with mysql in default, default-no-eca and test delegators as follows:
<delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-ecareader="main" distributed-cache-clear-enabled="false">
<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>

<delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-ecareader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">


<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>

<!-- 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

1. Run the following command from command prompt:


ofbiz-dir>java -jar ofbiz.jar -install
2. Start OfBiz

5. Debugging (or running) OFBiz in Eclipse

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

Main class: org.ofbiz.base.start.Start

If you need it (to trace a framework bug in the 1st loaded class) you may use the "Stop in
Main" Option
Arguments:

VM arguments: -Xms128M Xmx512M

Working directory: Use default working directory


Classpath

Bootstrap Entries: JRE System Library

User Entries: ofbiz.jar from OFBiz project

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

Click Add Projects... (buttons on the right)

Select the ofbiz project

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

You might also like