This page is intended to be the root of Cookbook, FAQ, Tips, Tricks, HowTo, etc.
You may find supplementary useful informations at Old OFBiz wiki and Opentaps's OFBiz cookbooks part but note that this information may be outdated...
Tip | ||
---|---|---|
| ||
|
Tables of content
Table of Contents | ||||
---|---|---|---|---|
|
...
Accounting
- MISC Accounting Links
- Billing Account
- If you get accounting related issues and are not interested in posting accounting transactions, see here
- Show prices with VAT included in including VAT in eCommerce (retail, B2C)
- How are managed transactions in different currencies from the one of GL ?
- glAccountClass vs glAccountType : follow the links
- A thread about glAccountType
- Sage payment integration
Apache HTTPD (Apache Web server)
- Apache ProxyPassReverse Directive advices
- Beware of HTTP ETag
- Sticky session load balancing with Apache and mod_balancer on Ubuntu Linux
- Install OFBiz with MariaDB, Apache2 Proxy and SSL
Ajax - Javascript - Json
- Take a look at DWR. I found this really easy to integrate with OFBiz. No complicated Javascript/JSON. Also, its Apache V2 licensed.
- Disabling right click: document.oncontextmenu=new Function("return false")
- Restrict your user to go back: window.history.forward(0
...
- Some details about SSL and X.509
- How to configure authorize.net certificates
- Google Checkout Integration
- Here is a pretty good tutorial on getting your SSL certificate setup
...
- OFBiz HTML Element Collection Styles
- If you get this problem The horizontal menu in the right column is causing the HTML elements below it to drop down to the bottom of the screen
DataBase
Miscellaneous
OFBiz's Data File Tools Some tips from Jacopo
- How to use EntityWhereString A tip from GrimTim
- How to troubleshoot SQL errors A tip from Chris Lombardi
- How to measure SQL queries durations
- How to use OFBiz on read only database
- Tips for View Entities A tip from SkipDever
- How to connect to an External Database A tip from Adrian Crum
- How to save customised data for import as demo data A tip from Raj Saini
- Is it possible to delete products, categories, catalogs, etc., that are no longer needed?
- About lastUpdatedStamp, lastUpdatedTxStamp (transaction), createdStamp, and createdTxStamp
- Why primary keys are VAR_CHAR type in OFBiz ? A tip from David E. Jones
MySQL
Oracle
PostgreSQL
Tune your PostgreSQL installation a tip from Mike <mz4wheeler@gmail.com>
- Setup OFBiz version 16.11.02 with PostgresSQL on Windows (from Do Nhu Vy)
MariaDB
Development tips
From Ant to Gradle
- How to run multiple ofbiz instances on one PC: see technical production setup guide, section URL and Port Settings
What is the best practice to modify an existing component or create a new one?
- What is considered the best practice in creating a custom web application with OFBIZ?
- How to Extend an existing component in customized application?
- How to manage your source differences?
- Variables always available in screen context
- Tips & Tricks while working with Groovy
- Deprecating entities
- Add a WAR file
- Using locale XSD files instead of OFBiz remote (at http://ofbiz.apache.org/dtds) for validation and content completion
- UBPL Introduction
- Ofbiz as a development framework - release 9.04
- Ofbiz as a development framework - upcoming release 10.04
- Field Description tooltip help
- How to not have a string escaped for html : org.ofbiz.base.util.StringUtil.wrapString(uiLabelMap.yourString)
- Turning Firefox cache on/off (mostly for javascript testing)
- Validation in forms
- How to change the default messages
- Profiling Ofbiz with YourKit in Eclipse
- Note on creating a view-entity using entity or view-entity from other components
- When and when not restarting
- What is the difference between [+0] and [] in a widget screen file?
Eclipse IDE
...
Setup Intellij IDEA IDE for OFBiz Framework - Guide applicable for OFBiz 16.11.x and above, and for Linux-based or Mac working environment.
- Running and Debugging OFBiz in Intellij IDEA - Guide applicable for OFBiz 16.11.x and above.
Known issues
Licences
...
- Contact List How To
- As Is Communication Event Process Flow
- Issue with createAcctgTransAndEntries service
- Steps to process a Configurable Product
- How to display all information of a single party
- Product Promotion Example
- What is the difference between Event and Service?
- SECAs and Error/Failure Management
...
POS (the POS is deprecated and has been put in Attic)
...
- Monitoring and Maintaining the database
- Cleaning the database from unimportant data
- Users with disabled accounts are still able to login
- How to make redirection inside an application server without using mod_rewrite
- Handling of External data
- OAGIS
- How to hide products in eCommerce ?
- Performance : Server Hardware for Ofbiz hosting
- Load balance across multiple instances of OFBiz
- Custom Components in OFBiz
- Take advantages of a custom component
- How to use the Setup application It's a bit long ot load has it must create dynamically the documentation. You may prefer to simply use the Help in OFBiz itself...
- how to set the Distributed Entity Cache Clear Mechanism
...
- Getting and Running OFBiz in 5 steps (look, there are more Quick Start Guides under Jacopo's Wiki space)
RMI
This RMI error on client side?, click to see the tip
Code Block Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en_US
- How to use RMI without SSL
- How to test easily if RMI is working (using a simple client)
- Somethings you should know about RMI
Reporting tools
...
- Plugin search tools for Firefox using Nabble or Mark Mail
- To search in OFBiz spaces instead of all Apache Wiki (Apache cwiki is shared among Apache projects) use the OFBiz wiki search
Selenium
Soap / XML-RPC / REST
Attachments |
---|
- How to use SOAP in OFBiz
- A tutorial from Vincenzo Di Lorenzo, see Attachements uses Axis 1.4, deprecated since r892712 which introduced Axis2 in OFBiz
- A tutorial from Opentaps documentation (version 0.9v5), see Attachements uses Axis 1.4, deprecated since r892712 which introduced Axis2 in OFBiz
- Export Ofbiz Services that use complex type parameters via SOAP using AXIS2 deprecated since r892712 which introduced Axis2 in OFBiz
- You could also be interested by these linksComplex typesdeprecated since r892712 which introduced Axis2 in OFBiz{
- Export Ofbiz Services that use complex type parameters via SOAP using AXIS2 - since r892712+ - start here if you want to use SOAP
- Using XMLRPC as an alternative to SOAP
- Using XMLRPC with Flex client
- Export service using REST
Another approach deprecated since r892712
For those who are familiar with Spring, you may be interested by Apache CXF instead of AXIS2. You will find a quick comparaison between AXIS2 and CXF here deprecated since r89271
Themes
...
To unsubscribe You certainly forgot how you subscribed, it's easy to forgot if you use a Nabble forum to subscribe.
Windows
Workflow Engines
XSL:FO (FOP)
ZK (work in progress)
A tuto (screencast) for a ZK view handler
...
Then you are ready to create order and to specify the GC as a payment method.
A tip from Rashko Rejmer
Anchor | ||||
---|---|---|---|---|
|
...
where todos is and exe to download (search with Google). Of course you will have to deal with path. But at this stage I guess it's easy...
I just learned from https://sourceforge.net/project/shownotes.php?release_id=508633 that the "--binary" option may be used in that case, did no try yet...
I tried --binary today on a Windows XP system with patches created on the same system: it does not work :/
Anchor | ||||
---|---|---|---|---|
|
...
- You need JavaService.exeThis is freely available at http://javaservice.objectweb.org/.
Documentation and example code are also available
Unzip the JavaService-bin-1.2.x.zip (or JavaService-2.0.x.zip) Where should the expanded files be located?
Set up and run your script with the appropriate path. Ex:Code Block javaservice -install OFBiz %java_home%\jre\bin\server\jvm.dll -Xms256M -Xmx512M -Djava.class.path=%java_home%\lib\tools.jar;%ofbiz_home%\ofbiz.jar -start org.ofbiz.base.start.Start -out %ofbiz_home%\logs\serviceLog.txt -err %ofbiz_home%\logs\serviceErr.txt -current %ofbiz_home% -manual
Note: If your java sdk is installed under a directory with a space in it, the service will install, but not start properly, unless you change java_home to the DOS 8.3 name. For example, if your java sdk is installed inC:\Program Files\Java\j2sdk1.4.2_xx
then you wouldset java_home=C:\PROGRA~1\Java\j2sdk1.4.2_xx
* Go to the win2k services app and you should now find a service 'OFBiz' set up to run manually (this of course can be changed to run automatically if so desired).
- Alternatively, the service can be started with the command:net start OFBiz
- And the service can then be stopped with the command:net stop OFBiz
...
If you receive an SQL error in ofbiz, it doesn't show the error from the database itself. Instead, it shows a general error which isn't neccessarily clear. Run the SQL directly on the database get a more helpful error message.
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
<datasource name="localderby" helper-class="org.apache.ofbiz.entity.datasource.ReadOnlyHelperDAO" schema-name="OFBIZ" field-type-name="derby">... |
...
Anchor | ||||
---|---|---|---|---|
|
...
If you really need to do it, think about these 4 points before...
Anchor | ||||
---|---|---|---|---|
|
Show prices with VAT included in eCommerce (B2C)
For that you must :
...
In order to show the prices including VAT in the store for consumers, you need to take following steps:
- in the accounting component:
- adjust the data for the appropriate Tax Authority so that 'Include Tax in Price' = 'Y'
- associate the appropriate product categories under the 'Categories' tab of the Tax Authority
- set the appropriate product rate (for Value Added Tax)
- optionally set the flag for 'Tax Promotions'
- optionally set the flag for 'Tax Shipping'
- in the catalog component for the appropriate store (in the section 'TAX':
- set the flag 'Show prices with VAT tax included' to 'Y'
- set the appropriate Vat Tax Auth Geo ID
- set the appropriate Vat Tax Auth Party ID
For now you can't set a different VAT rate for shipping, see last comment of
Jira | ||||||
---|---|---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
...
If the caches are on (ie not on dev mode), it's the same (you don't need to recompile) but you need to clear the caches. See at ...webtools/control/FindUtilCache You might even clear only the cache where things changed (production performance).
Anchor | ||||
---|---|---|---|---|
|
...
The ETag header is causing an issue with browser cache not being updated when the server has been updated. Actually a weak ETag, see http://en.wikipedia.org/wiki/HTTP_ETag
Seems like tomcat’s DefaultServlet will only serve weak ETag’s even though tomcat7+ does have code for strong ETag but is never used and there is no documentation on how to set it
A possible solution is to remove If-None-Match request header and ETag response header in apache http server
RequestHeader unset If-None-Match
Header unset ETag
Anchor | ||||
---|---|---|---|---|
|
How to measure SQL queries durations
If a query takes more than 150 ms its duration is shown in log. To change that look for:
Debug.logTiming("Ran query in "
in GenericDAO.java
Anchor | ||||
---|---|---|---|---|
|
What is the difference between [+0] and [] in a widget screen file?
[] If the list does not exist, create a new list and append item to it. If the list exist, append item to the end of the list
[+0] If list does not exist, create a new list and append item to it. If the list exist, insert item at the beginning of the list
Anchor | ||||
---|---|---|---|---|
|
What's the recommended workflow engine in OFBiz? Is it Shark?
OFBiz gave up on Workflow Engines. Shark was implemented last but never really used in OFBiz. Instead of using a Workflow Engine, OFBiz uses an Event Driven Architecture (EDA), so ECAs (SECA, EECA, MECA) are used in OFBiz to drive the Workflow. ECA is the acronym of Event Condition Action. SECAs are for Services (triggered on services conditions), EECAs are for Entity (triggered on entities conditions), MECAs are for Mail.
Anchor | ||||
---|---|---|---|---|
|
Dash vs "en dash" in Gradle commands
When you use a command like
gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"
Beware that copying this command in Microsoft Word will automatically transform the double dash in "en dashes" (Unicode 0x2013: "–" from Unicode Map)
Other cases not related to Word were also reported.So when this command does not work check that you are really using dashes!
Anchor | ||||
---|---|---|---|---|
|
If you have problems to buid OFBiz on Windows 10 try this:
from Turn windows feature on or off ->Windows subsystem for Linux->Restart and retry