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
Administrator
Hi,

Your message has been moderated.

Please use and subscribe to the user ML for such questions
see why here http://ofbiz.apache.org/mailing-lists.html
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

Thanks

Jacques


ForwardedMessage.eml

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

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


Hi,


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
"org.ofbiz".
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 java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131]
at org.ofbiz.base.concurrent.ExecutionPool.getAllFutures(ExecutionPool.java:85) [bin/:?]
at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:253) [bin/:?]
at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:33) [bin/:?]
at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:1) [bin/:?]
at org.ofbiz.base.util.UtilObject.getObjectFromFactory(UtilObject.java:200) [bin/:?]
at org.ofbiz.entity.DelegatorFactory.getDelegator(DelegatorFactory.java:51) [bin/:?]
at org.ofbiz.infra.integ.MyClass.main(MyClass.java:47) [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(ResourceLoader.java:170) ~[bin/:?]
at org.ofbiz.base.config.FileLoader.getURL(FileLoader.java:34) ~[bin/:?]
at org.ofbiz.base.config.FileLoader.loadResource(FileLoader.java:46) ~[bin/:?]
at org.ofbiz.base.config.ResourceLoader.loadResource(ResourceLoader.java:46) ~[bin/:?]
at org.ofbiz.base.config.MainResourceHandler.getStream(MainResourceHandler.java:76) ~[bin/:?]
at org.ofbiz.base.config.MainResourceHandler.getDocument(MainResourceHandler.java:65) ~[bin/:?]
at org.ofbiz.entity.model.ModelFieldTypeReader.getModelFieldTypeReader(ModelFieldTypeReader.java:90) ~[bin/:?]
at org.ofbiz.entity.GenericDelegator.initializeOneGenericHelper(GenericDelegator.java:276) ~[bin/:?]
at org.ofbiz.entity.GenericDelegator.access$3(GenericDelegator.java:261) ~[bin/:?]
at org.ofbiz.entity.GenericDelegator$1.call(GenericDelegator.java:297) ~[bin/:?]
at org.ofbiz.entity.GenericDelegator$1.call(GenericDelegator.java:1) ~[bin/:?]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:1.8.0_131]
at java.lang.Thread.run(Unknown 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


Loading...