http://ofbiz.116.s1.nabble.com/jira-Commented-OFBIZ-5729-ofbiz-hangs-on-installing-tenant-database-tp4664055.html
I followed all of the steps you described and I am unable to reproduce the problem.
This appears to be an intermittent problem, and without a unit test to prove it exists, it is difficult to fix.
> ofbiz hangs on installing tenant database
> ------------------------------------------
>
> Key: OFBIZ-5729
> URL:
https://issues.apache.org/jira/browse/OFBIZ-5729> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Trunk
> Environment: Using:
> Ubuntu 14.04
> java version "1.7.0_67"
> Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
> Reporter: Wai
> Assignee: Adrian Crum
> Priority: Critical
> Attachments: ofbiz console output-with bug.log, ofbiz console output-with fix.log, ofbiz-5729.patch, ofbiz-5729.patch, ofbiz-5729.patch
>
>
> When installing data into a tenant database, ofbiz hangs.
> Using the following command line.
> $ ant load-tenant-data-readers -Ddata-readers=seed -DtenantId=DEMO1
> The problem is that ofbiz uses DelegatorFactory.getDelegator() to find/create the tenant delegator, asynchronously, for the target tenant database using a single daemon thread. As part of the tenant delegator creation, it needs to find/create a base delegator. When the base delegator is intially absent, ofbiz will block trying to create one by using the same daemon thread--which is already being used. Hence, ofbiz is deadlocked.
> The solution is to make sure that a base delegator is always created first before a find/create tenant delegator is attempted.