Question about ofbiz.home error

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Question about ofbiz.home error

Jacques Le Roux

Your message has been moderated.

Please use and subscribe to the user ML for such questions
see why here
You will get a better support and it's more fair to share with everybody

The wider the audience the better the answers you might get




Sujet :
Question about ofbiz.home error
De :
Vaibhav Jain <[hidden email]>
Date :
28/07/2017 11:55

Pour :
"[hidden email]" <[hidden email]>


First of all, thank-you and the whole Apache team for all these great products.

Below are the details:

 1. Ofbiz Version - 13.07
 2. Java : 1.8
 3. Eclipse : Oxygen
 4. OS: Win 7

So what I am trying to do is, create a java class, in the hot deployment component. I want this class to read stuff from my ofbiz queues. Now, I am
able to pass values and red out from the queue. As a second step in this class, I am trying to create a delegator, as shown below :

Delegator delegator = DelegatorFactory.getDelegator("default");
LocalDispatcher dispatcher = ServiceDispatcher.getLocalDispatcher("default", delegator);

I am planning to use this dispatcher, to call the runsync method

resp = dispatcher.runSync("ofbiz service", noteCtx);

But, I am getting the below error :

2017-07-28 15:09:27,251 |OFBiz-config-0       |GenericDelegator      |I| Delegator "default" initializing helper "localderby" for entity group
2017-07-28 15:09:27,314 |OFBiz-config-0       |ResourceLoader      |E| The Java environment (-Dxxx=yyy) variable with name ofbiz.home is not set,
cannot load resource.
2017-07-28 15:09:27,314 |main                 |ExecutionPool       |E| null
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The Java environment (-Dxxx=yyy) variable with name ofbiz.home is not
set, cannot load resource.
at Source) ~[?:1.8.0_131]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131]
at org.ofbiz.base.concurrent.ExecutionPool.getAllFutures( [bin/:?]
at org.ofbiz.entity.GenericDelegator.<init>( [bin/:?]
at org.ofbiz.entity.DelegatorFactoryImpl.getInstance( [bin/:?]
at org.ofbiz.entity.DelegatorFactoryImpl.getInstance( [bin/:?]
at org.ofbiz.base.util.UtilObject.getObjectFromFactory( [bin/:?]
at org.ofbiz.entity.DelegatorFactory.getDelegator( [bin/:?]
at org.ofbiz.infra.integ.MyClass.main( [bin/:?]
Caused by: java.lang.IllegalArgumentException: The Java environment (-Dxxx=yyy) variable with name ofbiz.home is not set, cannot load resource.
at org.ofbiz.base.config.ResourceLoader.fullLocation( ~[bin/:?]
at org.ofbiz.base.config.FileLoader.getURL( ~[bin/:?]
at org.ofbiz.base.config.FileLoader.loadResource( ~[bin/:?]
at org.ofbiz.base.config.ResourceLoader.loadResource( ~[bin/:?]
at org.ofbiz.base.config.MainResourceHandler.getStream( ~[bin/:?]
at org.ofbiz.base.config.MainResourceHandler.getDocument( ~[bin/:?]
at org.ofbiz.entity.model.ModelFieldTypeReader.getModelFieldTypeReader( ~[bin/:?]
at org.ofbiz.entity.GenericDelegator.initializeOneGenericHelper( ~[bin/:?]
at org.ofbiz.entity.GenericDelegator.access$3( ~[bin/:?]
at org.ofbiz.entity.GenericDelegator$ ~[bin/:?]
at org.ofbiz.entity.GenericDelegator$ ~[bin/:?]
at Source) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ Source) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$ Source) ~[?:1.8.0_131]
at Source) ~[?:1.8.0_131]

Could you please suggest what I can do here? I have been stuck at this for quite a long time.

Thanks and Regards,

Vaibhav Jain