Apache OFBiz on OpenBSD
OpenBSD 6.4 amd64
java -version
openjdk version "1.8.0_172"
OpenJDK Runtime Environment (build 1.8.0_172-b11)
OpenJDK 64-Bit Server VM (build 25.172-b11, mixed mode)
Quick Start install: ./gradlew cleanAll loadDefault
Start OFBiz: ./gradlew ofbiz
View install: https://localhost:8443/ordermgr/control/main default login: admin/ofbiz
First attempt at install failed. ran ./gradlew cleanAll loadDefault and ended with the following error:
Download https://jcenter.bintray.com/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type TaskArtifactStateCacheAccess using TaskExecutionServices.createCacheAccess().
> Failed to create parent directory '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/.gradle' when creating directory '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/.gradle/2.13/taskArtifacts'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 37 mins 26.989 secs
Fixed some directory permissions, and tried a second time:
:cleanAll
:compileJavaNote: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:processResources
:classes
:jar
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
:check
:build
:ofbiz --load-data
Error occurred during initialization of VM
Unable to setup metadata virtual space list.
:ofbiz --load-data FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ofbiz --load-data'.
> Process 'command '/usr/local/jdk-1.8.0/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2 mins 34.288 secs
--------------------------------
as non-privileged user...
o$ ./gradlew
gradlew gradlew.bat
o$ ./gradlew ofbiz
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
:ofbiz
Error occurred during initialization of VM
Unable to setup metadata virtual space list.
:ofbiz FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ofbiz'.
> Process 'command '/usr/local/jdk-1.8.0/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
------
With --info:
o$ ./gradlew ofbiz --info
Starting Build
Settings evaluated using settings file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/settings.gradle'.
Projects loaded. Root project using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/build.gradle'.
Included projects: [root project 'ofbiz', project ':applications', project ':framework', project ':specialpurpose', project ':themes', project ':applications:accounting', project ':applications:commonext', project ':applications:content', project ':applications:datamodel', project ':applications:humanres', project ':applications:manufacturing', project ':applications:marketing', project ':applications:order', project ':applications:party', project ':applications:product', project ':applications:securityext', project ':applications:workeffort', project ':framework:base', project ':framework:catalina', project ':framework:common', project ':framework:datafile', project ':framework:entity', project ':framework:entityext', project ':framework:images', project ':framework:minilang', project ':framework:security', project ':framework:service', project ':framework:start', project ':framework:testtools', project ':framework:webapp', project ':framework:webtools', project ':framework:widget', project ':specialpurpose:assetmaint', project ':specialpurpose:bi', project ':specialpurpose:birt', project ':specialpurpose:cmssite', project ':specialpurpose:ebay', project ':specialpurpose:ecommerce', project ':specialpurpose:example', project ':specialpurpose:exampleext', project ':specialpurpose:hhfacility', project ':specialpurpose:ldap', project ':specialpurpose:lucene', project ':specialpurpose:myportal', project ':specialpurpose:passport', project ':specialpurpose:projectmgr', project ':specialpurpose:scrum', project ':specialpurpose:solr', project ':specialpurpose:webpos', project ':themes:bluelight', project ':themes:flatgrey', project ':themes:multiflex', project ':themes:rainbowstone', project ':themes:tomahawk']
Evaluating root project 'ofbiz' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/build.gradle'.
Evaluating project ':applications' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/build.gradle'.
Evaluating project ':framework' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/build.gradle'.
Evaluating project ':specialpurpose' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/build.gradle'.
Evaluating project ':themes' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/build.gradle'.
Evaluating project ':applications:accounting' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/accounting/build.gradle'.
Evaluating project ':applications:commonext' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/commonext/build.gradle'.
Evaluating project ':applications:content' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/content/build.gradle'.
Evaluating project ':applications:datamodel' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/datamodel/build.gradle'.
Evaluating project ':applications:humanres' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/humanres/build.gradle'.
Evaluating project ':applications:manufacturing' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/manufacturing/build.gradle'.
Evaluating project ':applications:marketing' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/marketing/build.gradle'.
Evaluating project ':applications:order' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/order/build.gradle'.
Evaluating project ':applications:party' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/party/build.gradle'.
Evaluating project ':applications:product' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/product/build.gradle'.
Evaluating project ':applications:securityext' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/securityext/build.gradle'.
Evaluating project ':applications:workeffort' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/applications/workeffort/build.gradle'.
Evaluating project ':framework:base' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/base/build.gradle'.
Evaluating project ':framework:catalina' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/catalina/build.gradle'.
Evaluating project ':framework:common' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/common/build.gradle'.
Evaluating project ':framework:datafile' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/datafile/build.gradle'.
Evaluating project ':framework:entity' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/entity/build.gradle'.
Evaluating project ':framework:entityext' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/entityext/build.gradle'.
Evaluating project ':framework:images' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/images/build.gradle'.
Evaluating project ':framework:minilang' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/minilang/build.gradle'.
Evaluating project ':framework:security' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/security/build.gradle'.
Evaluating project ':framework:service' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/service/build.gradle'.
Evaluating project ':framework:start' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/start/build.gradle'.
Evaluating project ':framework:testtools' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/testtools/build.gradle'.
Evaluating project ':framework:webapp' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/webapp/build.gradle'.
Evaluating project ':framework:webtools' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/webtools/build.gradle'.
Evaluating project ':framework:widget' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/framework/widget/build.gradle'.
Evaluating project ':specialpurpose:assetmaint' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/assetmaint/build.gradle'.
Evaluating project ':specialpurpose:bi' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/bi/build.gradle'.
Evaluating project ':specialpurpose:birt' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/birt/build.gradle'.
Evaluating project ':specialpurpose:cmssite' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/cmssite/build.gradle'.
Evaluating project ':specialpurpose:ebay' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/ebay/build.gradle'.
Evaluating project ':specialpurpose:ecommerce' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/ecommerce/build.gradle'.
Evaluating project ':specialpurpose:example' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/example/build.gradle'.
Evaluating project ':specialpurpose:exampleext' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/exampleext/build.gradle'.
Evaluating project ':specialpurpose:hhfacility' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/hhfacility/build.gradle'.
Evaluating project ':specialpurpose:ldap' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/ldap/build.gradle'.
Evaluating project ':specialpurpose:lucene' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/lucene/build.gradle'.
Evaluating project ':specialpurpose:myportal' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/myportal/build.gradle'.
Evaluating project ':specialpurpose:passport' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/passport/build.gradle'.
Evaluating project ':specialpurpose:projectmgr' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/projectmgr/build.gradle'.
Evaluating project ':specialpurpose:scrum' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/scrum/build.gradle'.
Evaluating project ':specialpurpose:solr' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/solr/build.gradle'.
Evaluating project ':specialpurpose:webpos' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/specialpurpose/webpos/build.gradle'.
Evaluating project ':themes:bluelight' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/bluelight/build.gradle'.
Evaluating project ':themes:flatgrey' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/flatgrey/build.gradle'.
Evaluating project ':themes:multiflex' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/multiflex/build.gradle'.
Evaluating project ':themes:rainbowstone' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/rainbowstone/build.gradle'.
Evaluating project ':themes:tomahawk' using build file '/home/d2dadmin/downloads/apache-ofbiz-16.11.05/themes/tomahawk/build.gradle'.
All projects evaluated.
Selected primary task 'ofbiz' from project :
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':assemble', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':check', task ':build', task ':ofbiz']
:compileJava (Thread[main,5,main]) started.
:compileJava
Skipping task ':compileJava' as it is up-to-date (took 2.51 secs).
:compileJava UP-TO-DATE
:compileJava (Thread[main,5,main]) completed. Took 2.565 secs.
:processResources (Thread[main,5,main]) started.
:processResources
Skipping task ':processResources' as it is up-to-date (took 7.493 secs).
:processResources UP-TO-DATE
:processResources (Thread[main,5,main]) completed. Took 7.601 secs.
:classes (Thread[main,5,main]) started.
:classes
Skipping task ':classes' as it has no actions.
:classes UP-TO-DATE
:classes (Thread[main,5,main]) completed. Took 0.003 secs.
:jar (Thread[main,5,main]) started.
:jar
Skipping task ':jar' as it is up-to-date (took 0.784 secs).
:jar UP-TO-DATE
:jar (Thread[main,5,main]) completed. Took 0.805 secs.
:assemble (Thread[main,5,main]) started.
:assemble
Skipping task ':assemble' as it has no actions.
:assemble UP-TO-DATE
:assemble (Thread[main,5,main]) completed. Took 0.002 secs.
:compileTestJava (Thread[main,5,main]) started.
:compileTestJava
Skipping task ':compileTestJava' as it is up-to-date (took 0.811 secs).
:compileTestJava UP-TO-DATE
:compileTestJava (Thread[main,5,main]) completed. Took 0.821 secs.
:processTestResources (Thread[main,5,main]) started.
:processTestResources
Skipping task ':processTestResources' as it has no source files.
:processTestResources UP-TO-DATE
:processTestResources (Thread[main,5,main]) completed. Took 0.057 secs.
:testClasses (Thread[main,5,main]) started.
:testClasses
Skipping task ':testClasses' as it has no actions.
:testClasses UP-TO-DATE
:testClasses (Thread[main,5,main]) completed. Took 0.002 secs.
:test (Thread[main,5,main]) started.
:test
Skipping task ':test' as it is up-to-date (took 0.807 secs).
:test UP-TO-DATE
:test (Thread[main,5,main]) completed. Took 0.882 secs.
:check (Thread[main,5,main]) started.
:check
Skipping task ':check' as it has no actions.
:check UP-TO-DATE
:check (Thread[main,5,main]) completed. Took 0.002 secs.
:build (Thread[main,5,main]) started.
:build
Skipping task ':build' as it has no actions.
:build UP-TO-DATE
:build (Thread[main,5,main]) completed. Took 0.002 secs.
:ofbiz (Thread[main,5,main]) started.
:ofbiz
Executing task ':ofbiz' (up-to-date check took 0.002 secs) due to:
Task has not declared any outputs.
Starting process 'command '/usr/local/jdk-1.8.0/bin/java''. Working directory: /home/d2dadmin/downloads/apache-ofbiz-16.11.05 Command: /usr/local/jdk-1.8.0/bin/java -Xms128M -Xmx1024M -Dfile.encoding=US-ASCII -Duser.country -Duser.language=en -Duser.variant -cp /home/d2dadmin/downloads/apache-ofbiz-16.11.05/build/libs/ofbiz.jar org.apache.ofbiz.base.start.Start
Successfully started process 'command '/usr/local/jdk-1.8.0/bin/java''
Error occurred during initialization of VM
Unable to setup metadata virtual space list.
:ofbiz FAILED
:ofbiz (Thread[main,5,main]) completed. Took 0.187 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ofbiz'.
> Process 'command '/usr/local/jdk-1.8.0/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 37.133 secs
Stopped 0 compiler daemon(s).
Verify you are running 64 bit java on 64 bit os:
o$ java -version
openjdk version "1.8.0_172"
OpenJDK Runtime Environment (build 1.8.0_172-b11)
OpenJDK 64-Bit Server VM (build 25.172-b11, mixed mode)
$ uname -a
OpenBSD o.dev2dev.net 6.4 GENERIC.MP#10 amd64
Then tweak Xmx and Xms as needed. Sometimes setting them too high will cause start errors, while too low may cause performance or later runtime errors, so may take some tweaking to get working just right.
Is there a formula somewhere in the docs to calculate between RAM, CPU, expected user load, modules etc, that is a useful formula?
Test here: https://o.dev2dev.net:8443/accounting/control/main
Beware of Vulnerabilities:
https://www.exploit-db.com/exploits/45975
References:
System requirements: https://cwiki.apache.org/confluence/display/OFBIZ/System+Requirements
Download: https://www.apache.org/dyn/closer.lua/ofbiz/apache-ofbiz-16.11.05.zip
Apache OFBiz Home Page: https://ofbiz.apache.org/index.html
Install on Ubuntu 16: https://medium.com/viithiisys/installation-steps-of-apache-ofbiz-16-0-in-ubuntu-2edc39e9c7e2