Welcome to Apache OFBiz®! A powerful top level Apache software project.OFBiz is an Enterprise Resource Planning (ERP) System written in Java andhouses a large set of libraries, entities, services and features to runall aspects of your business.
List of docs that reference OFBIZ_HOME: -----Original Message----- From: Boyden, Timothy [mailto:[email protected]] Sent: Friday, December 22, 2017 12:42 PM To: [email protected] Subject: RE: Cannot install apache-ofbiz-16. This page documents the usage with Gradle, the pre-Gradle documentation is here: Apache OFBiz Technical Production Setup Guide This page documents the trunk version, the documentation for the R16.11 version is here: Apache OFBiz Technical Production Setup Guide NOTE: this is the technical setup. The Java implementation allows installation of OSAS on a variety of platforms. Installing Oracle Database, PHP, and Apache on Microsoft Windows. Installing Apache HTTP Server. OFBiz Windows Setup 05 - OFBiz. Erp ofbiz installation - Duration: 7:21. 7:21 Apache OFBiz Tutorial Part 1. Welcome to the Apache Tomcat. [Page 2] Cannot install apache-ofbiz-16.11.03 on windows 10. Hello all, I do not get OFBiz istalled on my Windows 10 computer. I have tried any combination I could come up with.
For more details about OFBiz please visit the OFBiz Documentation page:
System requirements
The only requirement to run OFBiz is to have the Java Development Kit (JDK)version 8 installed on your system (not just the JRE, but the full JDK) whichyou can download from the below link.
Note: if you are using Eclipse, make sure of running the appropriate Eclipsecommand
gradlew eclipse
before creating the project in Eclipse.This command will prepare OFBiz for Eclipse with the correct classpath and settingsby creating the.classpath and .project files.Note: if you want to use an external DBMS, instead of the embedded Derby, you will need a JDBC driver.The only thing you need to do is add a dependency in build.gradle to the MySQL/PostgreSQL/whatever JDBC driver.Search in Jcenter for the database driver suitable for the database installed on your production system.For example, under the dependencies section you can add something like this for mysql:
runtime 'mysql:mysql-connector-java:5.1.36'
Of course you need to make sure the connector is compatible with your version of the database installed!Quick start
To quickly install and fire-up OFBiz, please follow the below instructionsfrom the command line at the OFBiz top level directory (folder)
Prepare OFBiz:
Note: Depending on your Internet connection speed it might take a longtime for this step to complete if you are using OFBiz for the first timeas it needs to download all dependencies. So please be patient!
MS Windows:
gradlew cleanAll loadDefault
Unix-like OS:
./gradlew cleanAll loadDefault
Start OFBiz:
MS Windows:
gradlew ofbiz
Unix-like OS:
./gradlew ofbiz
Note: then ignore the % progress indicator because this task does not end as long as OFBiz is running.
Visit OFBiz through your browser:
You can log in with the user admin and password ofbiz.
Note: the default configuration uses an embedded Java database(Apache Derby) and embedded application server components such asApache Tomcat®, Apache Geronimo (transaction manager), etc.
Security
You can trust the OFBiz Project Management Committee members and committers do their best to keep OFBiz secure from external exploits,and fix vulnerabilities as soon as they are known. Despite these efforts, if ever you find and want to report a security issue, please reportat: security @ ofbiz.apache.org, before disclosing them in a public forum.
Note: Be sure to read this Wiki page if ever you plan to use RMI, JNDI, JMX or Spring and maybe other Java classes OFBiz does not useOut Of The Box (OOTB): The infamous Java serialization vulnerability
You can find more information about security in OFBiz at Keeping OFBiz secure
Build system syntax
All build tasks are executed using the Gradle build system whichis embedded in OFBiz. To execute build tasks go to OFBiz top-leveldirectory (folder) and execute tasks from there.
Operating System Syntax
The syntax for tasks differ slightly between windows and Unix-like systems
- Windows:
gradlew <tasks-in-here>
- Unix-like:
./gradlew <tasks-in-here>
For the rest of this document, we will use the windows syntax, if you are ona Unix-like system, you need to add the
./
to gradlewTypes of tasks in Gradle
There are two types of tasks designed for OFBiz in Gradle:
- Standard tasks: To execute general standard Gradle tasks
- OFBiz server tasks: To execute OFBiz startup commands. Thesetasks start with one of the following words:
- ofbiz : standard server commands
- ofbizDebug : server commands running in remote debug mode
- ofbizBackground ; server commands running in a background forked process
Tips:
- OFBiz server commands require 'quoting' thecommands. For example:
gradlew 'ofbiz --help'
- Shortcuts to task names can be used by writing thefirst letter of every word in a task name. However, youcannot use the shortcut form for OFBiz server tasks.Example:
gradlew loadAdminUserLogin -PuserLoginId=myadmin
=gradlew lAUL -PuserLoginId=myadmin
Example standard tasks
gradlew build
gradlew cleanAll loadDefault testIntegration
Example OFBiz server tasks
gradlew 'ofbiz --help'
gradlew 'ofbizDebug --test'
gradlew 'ofbizBackground --start --portoffset 10000'
gradlew 'ofbiz --shutdown --portoffset 10000'
gradlew ofbiz
(default is --start)Example mixed tasks (standard and OFBiz server)
gradlew cleanAll loadDefault 'ofbiz --start'
Quick reference
You can use the below common list of tasks as a quick referencefor controlling the system. This document uses the windows tasksyntax, if you are on a Unix-like system, you need to add the
./
to gradlew i.e. ./gradlew
Help tasks
List OFBiz server commands
List all available commands to control the OFBiz server
gradlew 'ofbiz --help'
List build tasks
List all available tasks from the build system
gradlew tasks
List build projects
List all available projects in the build system
gradlew projects
Gradle build system help
Show usage and options for the Gradle build system
gradlew --help
Server command tasks
Start OFBiz
![Apache Ofbiz Installation Windows Apache Ofbiz Installation Windows](/uploads/1/2/6/2/126205447/366202356.jpg)
gradlew 'ofbiz --start'
start is the default server task so this also works:
gradlew ofbiz
Shutdown OFBiz
gradlew 'ofbiz --shutdown'
Get OFBiz status
gradlew 'ofbiz --status'
Force OFBiz shutdown
Terminate all running OFBiz server instances by callingthe appropriate operating system kill command. Use thiscommand to force OFBiz termination if the --shutdowncommand does not work. Usually this is needed when in themiddle of data loading or testing in OFBiz.
Warning: Be careful in using this command as force terminationmight lead to inconsistent state / data
gradlew terminateOfbiz
Start OFBiz in remote debug mode
Starts OFBiz in remote debug mode and waits for debuggeror IDEs to connect on port 5005
gradlew 'ofbizDebug --start'
OR
gradlew ofbizDebug
Start OFBiz on a different port
Start OFBiz of the network port offsetted by the rangeprovided in the argument to --portoffset
gradlew 'ofbiz --start --portoffset 10000'
Start OFBiz in the background
![Ofbiz Ofbiz](/uploads/1/2/6/2/126205447/941230781.png)
Start OFBiz in the background by forking it to a newprocess and redirecting the output to runtime/logs/console.log
gradlew 'ofbizBackground --start'
OR
gradlew ofbizBackground
You can also offset the port, for example:
gradlew 'ofbizBackground --start --portoffset 10000'
Data loading tasks
OFBiz contains the following data reader types:
- seed: OFBiz and External Seed Data - to be maintained along with source andupdated whenever a system deployment is updated
- seed-initial: OFBiz and External Seed Data - to be maintained along withsource like other seed data, but only loaded initially and not updatedwhen a system is updated except manually reviewing each line
- demo: OFBiz Only Demo Data
- ext: External General Data (custom)
- ext-test: External Test Data (custom)
- ext-demo: External Demo Data (custom)
you can choose which data readers to pass in the following syntax:
gradlew 'ofbiz --load-data readers=<readers-here-comma-separated>'
Example:
gradlew 'ofbiz --load-data readers=seed,seed-initial,ext,ext-demo'
Load default OFBiz data
Loads default data set; meant for initial loading of generic OFBiz data.Can be applied for development, testing, demonstration, etc. purposes.Be aware that executing this task can result in your data being overwritten in your database of choice.Use with caution in production environments.The default data set is defined by datasource using the read-data attribute,followed by the name of the data set, into the datasource element of the 'entityengine.xml' file.
gradlew loadDefault
OR
gradlew 'ofbiz --load-data'
Load seed data
Load ONLY the seed data (not seed-initial, demo, ext* or anything else);meant for use after an update of the code to reload the seed dataas it is generally maintained along with the code and needs to bein sync for operation
gradlew 'ofbiz --load-data readers=seed'
load ext data
Load seed, seed-initial and ext data; meant for manual/generictesting, development, or going into production with a derivedsystem based on stock OFBiz where the ext data basicallyreplaces the demo data
gradlew 'ofbiz --load-data readers=seed,seed-initial,ext'
load ext test data
Load seed, seed-initial, ext and ext-test data; meant forautomated testing with a derived system based on stock OFBiz
gradlew 'ofbiz --load-data readers=seed,seed-initial,ext,ext-test'
load data from an entity file
Load data from an XML file holding entity data.
gradlew 'ofbiz --load-data file=foo/bar/FileNameHere.xml'
create a new tenant
Create a new tenant in your environment, create the delegator, loadinitial data with admin-user and password (needs multitenant=Y ingeneral.properties). The following project parameters are passed:
- tenantId: mandatory
- tenantName: optional, default is value of tenantId
- domainName: optional, default is org.apache.ofbiz
- tenantReaders: optional, default value is seed,seed-initial,demo
- dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)
- dbIp: optional, ip address of the database
- dbUser: optional, username of the database
- dbPassword: optional, password of the database
gradlew createTenant -PtenantId=mytenant
gradlew createTenant -PtenantId=mytenant -PtenantName='My Name' -PdomainName=com.example -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M -PdbIp=127.0.0.1 -PdbUser=mydbuser -PdbPassword=mydbpass
If run successfully, the system creates a new tenant having:
- delegator: default#${tenandId} (e.g. default#mytenant)
- admin user: ${tenantId}-admin (e.g. mytenant-admin)
- admin user password: ofbiz
load data for a specific tenant
Load data for one specific tenant in a multitenant environment. Notethat you must set multitenant=Y in general.properties and thefollowing project parameters are passed:
- tenantId (mandatory)
- tenantReaders (optional)
- tenantComponent (optional)
gradlew loadTenant -PtenantId=mytenant
gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base
Testing tasks
Execute all unit tests
gradlew test
Execute all integration tests
gradlew testIntegration
OR
gradlew 'ofbiz --test'
Execute an integration test case
run a test case, in this example the component is 'entity' and the casename is 'entity-tests'
gradlew 'ofbiz --test component=entity --test case=entity-tests'
Execute an integration test case in debug mode
listens on port 5005
gradlew 'ofbizDebug --test component=entity --test case=entity-tests'
Execute an integration test suite
gradlew 'ofbiz --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests'
Execute an integration test suite in debug mode
listens on port 5005
gradlew 'ofbizDebug --test component=widget --test suitename=org.apache.ofbiz.widget.test.WidgetMacroLibraryTests'
Miscellaneous tasks
Launch a graphical user interface of Gradle
This is a very convenient feature of Gradle whichallows the user to interact with Gradle through aswing GUI. You can save frequently used commandsin a list of favorites for frequent reuse.
gradlew --gui
Run all tests on a clean system
gradlew cleanAll loadDefault testIntegration
Clean all generated artifacts
gradlew cleanAll
Apache Ofbiz Download
Refresh the generated artifacts
gradlew clean build
Create an admin user account
Create an admin user with login name MyUserName and default passwordwith value 'ofbiz'. Upon first login OFBiz will request changing thedefault password
gradlew loadAdminUserLogin -PuserLoginId=MyUserName
Compile Java using Xlint output
Xlint prints output of all warnings detected by the compiler
gradlew -PXlint build
Run OWASP tool to identify dependency vulnerabilities (CVEs)
The below command activates a gradle plugin (OWASP) and Identifiesand reports known vulnerabilities (CVEs) in OFBiz library dependencies.This command takes a long time to execute because it needs to downloadall plugin dependencies and the CVE identification process is alsotime consuming
gradlew -PenableOwasp dependencyCheck
Setup eclipse project for OFBiz
Setting up OFBiz on eclipse is easy by simply running the below commandand then importing the project to eclipse. This command will generatethe necessary .classpath and .project files for eclipse and itwill also make the source code for external libraries available ineclipse (i.e. you can view source through Ctrl + Click)
The first time you run this command it will take a long time to executebecause it will download source packages available for projectdependencies.
gradlew eclipse
OFBiz plugin system
OFBiz provides an extension mechanism through plugins. Plugins are standardOFBiz components that reside in the plugins directory. Plugins can beadded manually or fetched from a maven repository. The standard tasks formanaging plugins are listed below.
Note: OFBiz plugin versions follow Semantic Versioning 2.0.0
Pull (download and install) a plugin automatically
Download a plugin with all its dependencies (plugins) and install them one-by-onestarting with the dependencies and ending with the plugin itself.
gradlew pullPlugin -PdependencyId='org.apache.ofbiz.plugin:myplugin:0.1.0'
If the plugin resides in a custom maven repository (not jcenter or localhost) thenyou can use specify the repository using below command:
gradlew pullPlugin -PrepoUrl='http://www.example.com/custom-maven' -PdependencyId='org.apache.ofbiz.plugin:myplugin:0.1.0'
If you need username and password to access the custom repository:
gradlew pullPlugin -PrepoUrl='http://www.example.com/custom-maven' -PrepoUser=myuser -PrepoPassword=mypassword -PdependencyId='org.apache.ofbiz.plugin:myplugin:0.1.0'
Pull a source plugin
Download a plugin from source control (currently subversion) and place it inthe plugins directory. This is mostly useful when working on the trunk branchas it requires the latest version of a plugin
gradlew pullPluginSource -PpluginId=ecommerce
Install a plugin
If you have a plugin called mycustomplugin and want to install it in OFBiz follow thebelow instructions:
- Extract the plugin if it is compressed
- Place the extracted directory into /plugins
- Run the below command
gradlew installPlugin -PpluginId=myplugin
The above commands executes the task 'install' in the plugin's build.gradlefile if it exists
Uninstall a plugin
If you have an existing plugin called mycustomplugin and you wish to uninstallrun the below command
gradlew uninstallPlugin -PpluginId=myplugin
The above command executes the task 'uninstall' in the plugin's build.gradlefile if it exists
Remove a plugin
Calls uninstallPlugin on an existing plugin and then delete it from the file-system
gradlew removePlugin -PpluginId=myplugin
Create a new plugin
Create a new plugin. The following project parameters are passed:
- pluginId: mandatory
- pluginResourceName: optional, default is the Capitalized value of pluginId
- webappName: optional, default is the value of pluginId
- basePermission: optional, default is the UPPERCASE value of pluginId
gradlew createPlugin -PpluginId=myplugin
gradlew createPlugin -PpluginId=myplugin -PpluginResourceName=MyPlugin -PwebappName=mypluginweb -PbasePermission=MYSECURITY
The above command creates a new plugin in /plugins/myplugin
Push a plugin to a repository
This task publishes an OFBiz plugin into a maven package and then uploads it toa maven repository. Currently, pushing is limited to localhost maven repository(work in progress). To push a plugin the following parameters are passed:
- pluginId: mandatory
- groupId: optional, defaults to org.apache.ofbiz.plugin
- pluginVersion: optional, defaults to 0.1.0-SNAPSHOT
- pluginDescription: optional, defaults to 'Publication of OFBiz plugin ${pluginId}'
gradlew pushPlugin -PpluginId=myplugin
gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin -PpluginVersion=1.2.3 -PpluginDescription='Introduce special functionality X'
Useful Tips
Gradle tab-completion on Unix-like systems:
To get tab completion (auto complete gradle commands by pressing tab)you can download the script from the below link and place it in theappropriate location for your system.
For example, on debian based systems, you can use the following command:
sudo curl -L -s https://gist.github.com/Ea87/46401a96df31cd208a87/raw/gradle-tab-completion.bash -o /etc/bash_completion.d/gradle-tab-completion.bash
Crypto notice
This distribution includes cryptographic software. The country inwhich you currently reside may have restrictions on the import,possession, use, and/or re-export to another country, ofencryption software. BEFORE using any encryption software, pleasecheck your country's laws, regulations and policies concerning theimport, possession, or use, and re-export of encryption software, tosee if this is permitted. See http://www.wassenaar.org/ for moreinformation.
The U.S. Government Department of Commerce, Bureau of Industry andSecurity (BIS), has classified this software as Export CommodityControl Number (ECCN) 5D002.C.1, which includes information securitysoftware using or performing cryptographic functions with asymmetricalgorithms. The form and manner of this Apache Software Foundationdistribution makes it eligible for export under the License ExceptionENC Technology Software Unrestricted (TSU) exception (see the BISExport Administration Regulations, Section 740.13) for both objectcode and source code.
The following provides more details on the included cryptographicsoftware:
- Various classes in OFBiz, including DesCrypt, HashCrypt, andBlowFishCrypt use libraries from the Sun Java JDK API includingjava.security.* and javax.crypto.* (the JCE, Java CryptographyExtensions API)
- Other classes such as HttpClient and various related ones usethe JSSE (Java Secure Sockets Extension) API
Active1 year, 10 months ago
I have been trying to install Apache Ofbiz on my 32-bit processor computer, with Windows 7 as the operating system. I have downloaded Javajdk1.8.0_25: and apache-ant-1.9.4: and :apache-ofbiz-13.07.01. I made two environmental variables, JAVA_HOME and ANT_HOME; in addition, I included both Java and Ant Apache Bin addresses respectively into the environmental the PATH variable. Then I ran the CMD and entered the Ofbiz directory' cd [apache ofbiz address], thenceforward, I resumed into entering the the 'ant run-install' command, followed by 'ant run-install-seed', I received a 'build successful' message for both of the commands I entered. After the foregone commands were executed I proceeded into clicking the startofbiz located inside the apache ofbiz folder. A cmd screen opened listing all sorts of commands. Once all these were carried out I typed the following address into my internet search bar:
Notwithstanding, I constantly received the following error message that says THE TEMPLATE LOCATION IS EMPTY even after a numberless amount of permutations, deleting java, re-installing Ant Apache, etc:
:ERROR MESSAGE:org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Template location is empty (Template location is empty)
I have not been able to come to grasps with this issue. I don't believe things should be this difficult to install. I stand ready for any guidance, thank you.
Raul MunozRaul Munoz
3 Answers
As per my best knowledge ' ant load-seed (Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an ualong with the code and needs to be in sync for operation)'
Apache Ofbiz Demo
You need to fire ant load-demo start (if you're using OFbiz version 13.07.01).Please make your're at the root of the OFbiz project location. Fyi - At very first time it takes more than 20 mins to load all your demo data and seed data, so please be patient. Hope this will help you.
Note: Please rate this if find useful. Thanks
PAAPAA3,34022 gold badges3030 silver badges5757 bronze badges
This issue is not related to your Application setup. it seems your Application setup is fine. This is related to Seed data. The data which requires to initialize the default theme. To load the theme data, execute the following ant command then strat the application. The error should be disappeared now.
a_horse_with_no_name332k5454 gold badges515515 silver badges609609 bronze badges
SenthilmuruganSenthilmurugan
Since OFBiz switched from ant to gradle recently, the correct command to load the seed data is as follows (run in root ofbiz folder e.g. /opt/ofbiz and don't forget the quotes):
To get the available options for the ofbiz build, run:
Other ant-to-gradle hints can be found here.
Ofbiz Installation
You will then need to create an initial user (admin/ofbiz does only exist in demo data).
themolethemole