Re: JobPoller: Problems reading values from serviceengine.xml file

2015-12-15 Thread Scott Gray
That's a problem in the older versions caused by concurrent access to the
cached dom model of the serviceengine.xml file. The dom doesn't support
concurrent reads and you'll intermittently see this problem.

The only solution is to store the serviceengine configuration in POJOs
rather than caching the dom.  It's a pain to change because the cached dom
is referenced all over.  I believe Adrian converted it to POJOs in one of
the later versions, you could always try backporting that to your version.

Regards

Scott
On 6 Dec 2015 12:51, "Len Shein"  wrote:

> All
>
> Had an issue in which Pending Jobs in Job sandbox were not starting.
>
> Found the folliwng in the log file:
>
> 2015-12-05 18:09:01,480 (org.ofbiz.service.job.JobPoller@9240189) [
> JobPoller.java:295:ERROR] Problems reading values from serviceengine.xml
> file [java.lang.NumberFormatException: null]. Using defaults.
>
> JobPoller code at line 295
>
>
>
> *private* *int* minThreads() {
>
> *int* min = *MIN_THREADS*;
>
>
>
> *try* {
>
> min = Integer.*parseInt*(ServiceConfigUtil.*getElementAttr*(
> "thread-pool", "min-threads"));
>
> } *catch* (NumberFormatException nfe) {
>
> Debug.*logError*("Problems reading values from
> serviceengine.xml file [" + nfe.toString() + "]. Using defaults.",
> *module*);
>
> }
>
> *return* min;
>
> }
>
>
>
> Removed “serviceengine.xml” from *Cache Name* resource.ResourceLoaders.
>
> Removing this cleared the issue and all PENDING jobs kicked off.
>
>
>
> We are using Ofbiz 10 ( which I understand is no longer supported).
>
>  However asking the community if anyone has any clues as how the
> serviceengine.xml could be corrupted in such a way that the Job Poller is
> unable to read from it?
>
>
>
>
>
>
>
> Len Shein
>
> lsh...@solveda.com
>
>
>
> Office: 516.742.7888 ext.225
>
> Home Office: 732.333.4303
>
> Cell: 917.882.8515
>
>
>
>
>


RE: JobPoller: Problems reading values from serviceengine.xml file

2015-12-15 Thread Len Shein
Thanks Scott, I'll take a look.

Regards
Len

-Original Message-
From: Scott Gray [mailto:scott.g...@hotwaxsystems.com] 
Sent: Tuesday, December 15, 2015 5:41 PM
To: user@ofbiz.apache.org
Subject: Re: JobPoller: Problems reading values from serviceengine.xml file

That's a problem in the older versions caused by concurrent access to the 
cached dom model of the serviceengine.xml file. The dom doesn't support 
concurrent reads and you'll intermittently see this problem.

The only solution is to store the serviceengine configuration in POJOs rather 
than caching the dom.  It's a pain to change because the cached dom is 
referenced all over.  I believe Adrian converted it to POJOs in one of the 
later versions, you could always try backporting that to your version.

Regards

Scott
On 6 Dec 2015 12:51, "Len Shein" <lsh...@solveda.com> wrote:

> All
>
> Had an issue in which Pending Jobs in Job sandbox were not starting.
>
> Found the folliwng in the log file:
>
> 2015-12-05 18:09:01,480 (org.ofbiz.service.job.JobPoller@9240189) [ 
> JobPoller.java:295:ERROR] Problems reading values from 
> serviceengine.xml file [java.lang.NumberFormatException: null]. Using 
> defaults.
>
> JobPoller code at line 295
>
>
>
> *private* *int* minThreads() {
>
> *int* min = *MIN_THREADS*;
>
>
>
> *try* {
>
> min = 
> Integer.*parseInt*(ServiceConfigUtil.*getElementAttr*(
> "thread-pool", "min-threads"));
>
> } *catch* (NumberFormatException nfe) {
>
> Debug.*logError*("Problems reading values from 
> serviceengine.xml file [" + nfe.toString() + "]. Using defaults.", 
> *module*);
>
> }
>
> *return* min;
>
> }
>
>
>
> Removed “serviceengine.xml” from *Cache Name* resource.ResourceLoaders.
>
> Removing this cleared the issue and all PENDING jobs kicked off.
>
>
>
> We are using Ofbiz 10 ( which I understand is no longer supported).
>
>  However asking the community if anyone has any clues as how the 
> serviceengine.xml could be corrupted in such a way that the Job Poller 
> is unable to read from it?
>
>
>
>
>
>
>
> Len Shein
>
> lsh...@solveda.com
>
>
>
> Office: 516.742.7888 ext.225
>
> Home Office: 732.333.4303
>
> Cell: 917.882.8515
>
>
>
>
>