View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


How to create a Store Server

Bulbgraph.png   This feature is officially available starting from 16Q2



This page discusses how you can create a store server instance. The assumption is that you have a running Openbravo Commerce central server.

The store server is created on the basis of the central server. A store server operates together with a central server. It receives master data from a central server and transactions are sent to a central server. This means that a central server and store server share data and often also functionality.

A store server is created in steps. These steps are described in this howto.

Central Server Stack

Two store server specific synchronization modules need to be present on the central server.

In addition depending on which functional modules you have installed you need additional synchronization modules. See the Synchronization_Modules_Overview page for more details.

Also the central server must be correctly set up for multi-server behavior. See here for more details.

The preference to activate multi-server behavior will be automatically set by installed the 'org.openbravo.retail.storeserver.synchronization' module mentioned above.

At least 2 more configurations must be done:

For details refer to the following guide.

Also a entry for the main server must be added to the 'Mobile Server' definition.

For more detailed information refer to the following guide.

Define the Store Server as a mobile server in the Central Server

First the store for which a store server needs to be installed needs to be setup completely in the central server as an Openbravo store, with POS terminals etc. This should be done in the same way as for any other store.

Then the next step is to define the store server as a mobile server in the Mobile Server window. The server type should be OB Store Server. Note that the url should be reachable by the central server if you want the central server to actively check the online status of the store.

As the server is for a specific store, the 'All Organizations' checkbox has to be unchecked and the organization of the store has to be listed in the subtab.


There are two other relevant fields to consider:

Prepare the Store Server installation

As a next step, install a server, the OS and database, so create the store server stack.

The following assumes all that setup has been done so a normal Openbravo installation works correctly.

Assemble the source code & modules required which at least needs to include the 2 modules also installed in the central server above.

Configure as usual with basic Openbravo setup (source.path, database connection information).

Add the store server specific configuration:

Validating the store server data

Before trying to export and install the store server data, it is advisable to run a process that will check if the store server data is consistent. This process will look for referencial integrity problems and will log them. If there are referencial integrity problems, the store data could be exported, but the installation would fail.

The validation process is run as an ant task like this from the Openbravo root folder of the central server:

ant -f modules/org.openbravo.replication.symmetricds/build.xml -DmobileServerKey=Store1

It has the following parameters:

The error are shown like this:

[SynchronizationStoreDataValidationTask] The following row from C_BPartner is referenced by C_Order but not exported (id, organizationId, identifier):

[SynchronizationStoreDataValidationTask] EDC5DBD82C3B4E3896B3955E041B242C, The White Valley Group, Arturo Montoro23

[SynchronizationStoreDataValidationTask] Referenced by C_Order.C_BPartner_ID (rowId, organization, identifier):

[SynchronizationStoreDataValidationTask] 470D2CDEC629C55C02DC793FE8F9D367, Vall Blanca Store, VBS1/0000114 - 16-08-2016 - 7.5

[SynchronizationStoreDataValidationTask] EB7CEEFF3DD11154ED287F65676FB617, Vall Blanca Store, VBS1/0000113 - 16-08-2016 - 7.5

[SynchronizationStoreDataValidationTask] EADDD0ABB40C304703F4BA2925AF5ABB, Vall Blanca Store, VBS1/0000112 - 16-08-2016 - 3.60

Registering a store in the central server

Before a store is exported, it must be registered in the central server using the following ant task:

ant -f modules/org.openbravo.replication.symmetricds/build.xml register.server -Dstore.server.key=Store1

Once this command is run, the central server will keep track of changes done in the data that should be sent to the new store server. The central server will keep them until the store server is started and the data is synchronized. This ensures that even if some time passes between the export of the store data and the store server start, no data will be lost in the store.

Export data from the central server

Openbravo Commerce suite will take care of synchronizing transactional and master data when a store server is running in a complete server environment. However, it makes sense to install a store server already with a good starting dataset. This section describes how to do that.

The main source of the store server specific data is always the central server. So the first step is to export the store server specific data. This can be done by executing the following ant command in the root of the ERP of the central server.

ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml -DmobileServerKey=store1 -DoutputDirectory=/opt/OpenbravoERP/modules/storeServer1Module

The exported reference data can be found in the referencedata/sampledata folder of the provided output directory.

Next: the exported reference data has to be moved/placed in the store server project, in the referencedata/sampledata directory of the root or a module in the store server instance.

All in one task: validate, register, export a store

Instead of executing the above steps 1-by-1 there is also the possibility to run them in one command:

ant -f modules/org.openbravo.retail.storeserver.synchronization/build.xml -DmobileServerKey=store1 -DoutputDirectory=/opt/OpenbravoERP/modules/storeServer1Module

Install the store server & data

At this point you have created the stack, the modules have been created in the project directory. The reference data is located in a module or in code in the referencedata/sampledata directory.

The in the config directory is setup with the correct information.

The next step is to run the following command:

ant install.source

If the data being imported does not require executing the modulescripts (i.e. it has been exported from a central server that has already run them) then the following command can be used:

ant install.source -Dexecute.modulescripts=false

This will both install Openbravo as well as import all the data in the store specific module which has been exported in the central system earlier in the process.

Start Tomcat

The last step is to start the store server and login with the same credentials as are used in the central server.

Before starting the store server make sure the central server is running, this is needed for online Symmetric DS registration.

Note: the log can show a warning as is shown below, this can be ignored.

Dec 18, 2015 3:28:42 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Dec 18, 2015 3:28:42 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:openbravo' did not find a matching property.
Dec 18, 2015 3:28:42 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context/Loader} Setting property 'useSystemClassLoaderAsParent' to 'false' did not find a matching property.
Dec 18, 2015 3:28:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Dec 18, 2015 3:28:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 657 ms
Dec 18, 2015 3:28:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 18, 2015 3:28:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
0    [main] INFO  org.openbravo.base.ConfigParameters - Properties file: /home/mtaal/mydata/dev/openbravo/projects/pi-core-store/WebContent//WEB-INF/
2    [main] INFO  org.openbravo.base.ConfigParameters - Checking override properties for oslo
97   [main] INFO  org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
98   [main] INFO  org.openbravo.base.model.ModelProvider - Building runtime model
5620 [main] INFO  org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
16016 [main] INFO  org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
16172 [main] INFO  org.openbravo.base.OBSchedulerInitializerListener - Quartz Initializer Servlet loaded, initializing Scheduler...
16251 [main] INFO  org.openbravo.base.OBSchedulerInitializerListener - Scheduler will start in 30 seconds.
16251 [main] INFO  org.openbravo.base.OBSchedulerInitializerListener - Storing the Quartz Scheduler Factory in the servlet context at key: org.quartz.impl.StdSchedulerFactory.KEY
16251 [main] INFO  org.openbravo.base.OBSchedulerInitializerListener - Storing ConfigParameters and ConnectionProvider in Scheduler Context.
16253 [main] INFO  org.openbravo.base.OBSchedulerInitializerListener - Initalizing singleton instance of org.openbravo.scheduling.OBScheduler
18784 [symmetric-engine-startup-0] WARN  org.jumpmind.symmetric.util.PropertiesFactoryBean - Could not load properties from file [/home/mtaal/./conf/]: ./conf/ (No such file or directory)
20958 [symmetric-engine-startup-0] WARN  org.jumpmind.symmetric.util.PropertiesFactoryBean - Could not load properties from file [/home/mtaal/./conf/]: ./conf/ (No such file or directory)
20962 [symmetric-engine-startup-0] WARN  org.jumpmind.symmetric.util.PropertiesFactoryBean - Could not load properties from file [/home/mtaal/./conf/]: ./conf/ (No such file or directory)
Dec 18, 2015 3:29:11 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Dec 18, 2015 3:29:13 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 18, 2015 3:29:13 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /
Dec 18, 2015 3:29:13 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/24  config=null
Dec 18, 2015 3:29:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31395 ms

Store Server Deployment Check

After starting the store server it makes sense to check that it is deployed correctly. For this purpose Openbravo provides a Store Server Deployment Check. This check can be executed from the central server backoffice. Many different characteristics of the store server, its configuration, symmetric DS setup, store server state, etc. are checked. The results of the check are shown to the user.

Retrieved from ""

This page has been accessed 1,696 times. This page was last modified on 22 May 2017, at 13:59. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.