JobPoller: Problems reading values from serviceengine.xml file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

JobPoller: Problems reading values from serviceengine.xml file

Len Shein-3

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 ([hidden email]) [ 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

[hidden email]

 

Office: 516.742.7888 ext.225

Home Office: 732.333.4303

Cell: 917.882.8515

 

 

Reply | Threaded
Open this post in threaded view
|

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

Scott Gray-3
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" <[hidden email]> 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
>
> [hidden email]
>
>
>
> Office: 516.742.7888 ext.225
>
> Home Office: 732.333.4303
>
> Cell: 917.882.8515
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

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

Len Shein-3
Thanks Scott, I'll take a look.

Regards
Len

-----Original Message-----
From: Scott Gray [mailto:[hidden email]]
Sent: Tuesday, December 15, 2015 5:41 PM
To: [hidden email]
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" <[hidden email]> 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
>
> [hidden email]
>
>
>
> Office: 516.742.7888 ext.225
>
> Home Office: 732.333.4303
>
> Cell: 917.882.8515
>
>
>
>
>