[jira] [Commented] (OFBIZ-9206) Login and logout process in demos shows a certificate issue

2017-02-25 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884428#comment-15884428
 ] 

Leonard Lin commented on OFBIZ-9206:


Hi [~jacques.le.roux]

I tested the patch with a load balancer and it worked for me.

load balancer listens to https:443
ofbiz internally runs on https:8443

The links generated are https://hostname:443/url

I didn't even add the SystemProperty entry
The only comment I would have is that the port-number 443 is not needed for 
protocol https

 https://hostname:443/catalog/control/login"; 
name="loginform">

but it works

> Login and logout process in demos shows a certificate issue
> ---
>
> Key: OFBIZ-9206
> URL: https://issues.apache.org/jira/browse/OFBIZ-9206
> Project: OFBiz
>  Issue Type: Bug
>  Components: Demo
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
> Attachments: OFBIZ-9206.patch
>
>
> When, from the site main page http://ofbiz.apache.org/, you get to the demos 
> depending on browser (tested on Windows 7) you get some issues:
> * FF
> ** Management Apps: OK
> ** Ecommerce: OK
> * Chrome (Management Apps or Ecommerce)
> ** stable: OK
> ** old: KO - If you copy the URL by hand it works, and after even from the 
> main page it works.
> ** trunk: OK
> * IE, same than Chrome
> If, from any browser, you logout from Management Apps you get a certificate 
> issue. Actually as we use HSTS the browsers protect us from any 3rd party 
> intrusions... Same issue when login in.
> So it seems we have a certificate issue after OFBIZ-7928 and INFRA-11960. 
> Maybe it's due to how OFBiz redirects when login in or login out because, so 
> far, only the login page is concerned...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9206) Login and logout process in demos shows a certificate issue

2017-02-25 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884167#comment-15884167
 ] 

Leonard Lin commented on OFBIZ-9206:


[~jacques.le.roux] ah wait, I just read through your fix and let me redeploy 
behind a reverse proxy and try again.
sorry my bad

> Login and logout process in demos shows a certificate issue
> ---
>
> Key: OFBIZ-9206
> URL: https://issues.apache.org/jira/browse/OFBIZ-9206
> Project: OFBiz
>  Issue Type: Bug
>  Components: Demo
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
> Attachments: OFBIZ-9206.patch
>
>
> When, from the site main page http://ofbiz.apache.org/, you get to the demos 
> depending on browser (tested on Windows 7) you get some issues:
> * FF
> ** Management Apps: OK
> ** Ecommerce: OK
> * Chrome (Management Apps or Ecommerce)
> ** stable: OK
> ** old: KO - If you copy the URL by hand it works, and after even from the 
> main page it works.
> ** trunk: OK
> * IE, same than Chrome
> If, from any browser, you logout from Management Apps you get a certificate 
> issue. Actually as we use HSTS the browsers protect us from any 3rd party 
> intrusions... Same issue when login in.
> So it seems we have a certificate issue after OFBIZ-7928 and INFRA-11960. 
> Maybe it's due to how OFBiz redirects when login in or login out because, so 
> far, only the login page is concerned...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9206) Login and logout process in demos shows a certificate issue

2017-02-25 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884160#comment-15884160
 ] 

Leonard Lin commented on OFBIZ-9206:


Hi [~jacques.le.roux] , thanks for working on this.

I applied your patch.
added the ""
into the table.

Login mask now still shows the hostname:port in the urls.

I'm not quiet sure if I follow the discussion above.
What's the intended behaviour?
In which cases should it show the full hostname+port and in which cases it 
should not?

Based on looking at it, for me it would make sense that it should never 
generate the full hostname:port url, unless it's explicitly set in the 
url.properties / SystemProperty table.
But I'm not sure if I understand all the cases/scenarious

Best
Leo

--copy-paste-

  https://localhost:8443/catalog/control/login"; 
name="loginform">

  
User Name

  
  
Password

  
  

  

  



https://localhost:8443/catalog/control/forgotPassword_step1";>Forgot Your 
Password?
  


> Login and logout process in demos shows a certificate issue
> ---
>
> Key: OFBIZ-9206
> URL: https://issues.apache.org/jira/browse/OFBIZ-9206
> Project: OFBiz
>  Issue Type: Bug
>  Components: Demo
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
> Attachments: OFBIZ-9206.patch
>
>
> When, from the site main page http://ofbiz.apache.org/, you get to the demos 
> depending on browser (tested on Windows 7) you get some issues:
> * FF
> ** Management Apps: OK
> ** Ecommerce: OK
> * Chrome (Management Apps or Ecommerce)
> ** stable: OK
> ** old: KO - If you copy the URL by hand it works, and after even from the 
> main page it works.
> ** trunk: OK
> * IE, same than Chrome
> If, from any browser, you logout from Management Apps you get a certificate 
> issue. Actually as we use HSTS the browsers protect us from any 3rd party 
> intrusions... Same issue when login in.
> So it seems we have a certificate issue after OFBIZ-7928 and INFRA-11960. 
> Maybe it's due to how OFBiz redirects when login in or login out because, so 
> far, only the login page is concerned...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (OFBIZ-9224) 16.11 ofbizUrl include host+port and break some reverse-proxy / docker setups

2017-02-20 Thread Leonard Lin (JIRA)
Leonard Lin created OFBIZ-9224:
--

 Summary: 16.11 ofbizUrl include host+port and break some 
reverse-proxy / docker setups
 Key: OFBIZ-9224
 URL: https://issues.apache.org/jira/browse/OFBIZ-9224
 Project: OFBiz
  Issue Type: Bug
Affects Versions: Release Branch 16.11
Reporter: Leonard Lin


OFBiz 16.11 has changed how it generates urls in its templates.
It sometimes includes hostname+port.

This can be reproduced on the official ofbiz-demo site:

Go to http://ofbiz.apache.org/
- Open the Ofbiz 13.07 Demo (Management Apps)
- - it will auto-login for your, do a logout so that you can see the login-mask
- - look at the HTML code and look for the form-post url etc. You can see that 
none of the URLs include hostname:port. They are all "/url/path"

- Open the Ofbiz 16.11 Demo (Management Apps)
- - it will auto-login for your, do a logout so that you can see the login-mask
- - look at the HTML code and look for the form-post url etc.
- - the post-urls and login-links have format: https://hostname:port/url/path

The new 16.11 behaviour can cause problems in cluster / reverse-proxy setups 
where actual host:port does not match public host:port 

Before 16.11 this was not an issue because all links were without 
hostname:port. But now the login masks loads but the subsequent links all show 
the wrong port.

url.properties does control port/hostname but preferably we wouldn't need to 
configure it.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9157) "View Order" throws exception in getReturnableQuantity

2017-01-21 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15832948#comment-15832948
 ] 

Leonard Lin commented on OFBIZ-9157:


Thanks!

> "View Order" throws exception in getReturnableQuantity
> --
>
> Key: OFBIZ-9157
> URL: https://issues.apache.org/jira/browse/OFBIZ-9157
> Project: OFBiz
>  Issue Type: Bug
>  Components: order
>Affects Versions: Release Branch 15.12, Release Branch 16.11
> Environment: Encountered this in 15.x and 16.x Trunk versions
>Reporter: Leonard Lin
>Assignee: Jacques Le Roux
>Priority: Minor
> Fix For: Release Branch 14.12, Release Branch 15.12, Upcoming 
> Release, 16.11.02
>
> Attachments: services_return.xml.patch
>
>
> Steps to Reproduce:
> - Create a sales order
> - Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
> - set the status of the order to completed
> - go to order-management and try to open the order for display like:
> https://localhost:8443/ordermgr/control/orderview?orderId=X
> Expected:
> - the order is displayed with status completed
> Actual:
> - A groovy exception is displayed.
> Analysis:
> The service "getReturnableQuantity" throws an exception because it returns 
> the returnablePrice = null, because the unitPrice of the orderItem was null.
> The OUT field returnablePrice is mandatory according to the 
> service-definition. The return parameter is set but the value is null, hence 
> the exception.
> Attached is a patch that will adjust the service-deinition to allow for 
> "null" value of the OUT parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OFBIZ-9157) "View Order" throws exception in getReturnableQuantity

2017-01-21 Thread Leonard Lin (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-9157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonard Lin updated OFBIZ-9157:
---
Environment: Encountered this in 15.x and 16.x Trunk versions  (was: 
Encountered this but in 15.x and 16.x Trunk versions)

> "View Order" throws exception in getReturnableQuantity
> --
>
> Key: OFBIZ-9157
> URL: https://issues.apache.org/jira/browse/OFBIZ-9157
> Project: OFBiz
>  Issue Type: Bug
>  Components: order
>Affects Versions: Release Branch 15.12, Release Branch 16.11
> Environment: Encountered this in 15.x and 16.x Trunk versions
>Reporter: Leonard Lin
>Priority: Minor
> Attachments: services_return.xml.patch
>
>
> Steps to Reproduce:
> - Create a sales order
> - Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
> - set the status of the order to completed
> - go to order-management and try to open the order for display like:
> https://localhost:8443/ordermgr/control/orderview?orderId=X
> Expected:
> - the order is displayed with status completed
> Actual:
> - A groovy exception is displayed.
> Analysis:
> The service "getReturnableQuantity" throws an exception because it returns 
> the returnablePrice = null, because the unitPrice of the orderItem was null.
> The OUT field returnablePrice is mandatory according to the 
> service-definition. The return parameter is set but the value is null, hence 
> the exception.
> Attached is a patch that will adjust the service-deinition to allow for 
> "null" value of the OUT parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OFBIZ-9157) "View Order" throws exception in getReturnableQuantity

2017-01-21 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15832922#comment-15832922
 ] 

Leonard Lin commented on OFBIZ-9157:


Hi [~jacques.le.roux],

Yes, the order and orderItem is created programmatically.

I import orders from an external Webshop into OFBiz for fulfillment processing.
In this project I'm not using OFBiz accounting / pricing, that's why no prices 
are set.

Best,
Leonard

> "View Order" throws exception in getReturnableQuantity
> --
>
> Key: OFBIZ-9157
> URL: https://issues.apache.org/jira/browse/OFBIZ-9157
> Project: OFBiz
>  Issue Type: Bug
>  Components: order
>Affects Versions: Release Branch 15.12, Release Branch 16.11
> Environment: Encountered this but in 15.x and 16.x Trunk versions
>Reporter: Leonard Lin
>Priority: Minor
> Attachments: services_return.xml.patch
>
>
> Steps to Reproduce:
> - Create a sales order
> - Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
> - set the status of the order to completed
> - go to order-management and try to open the order for display like:
> https://localhost:8443/ordermgr/control/orderview?orderId=X
> Expected:
> - the order is displayed with status completed
> Actual:
> - A groovy exception is displayed.
> Analysis:
> The service "getReturnableQuantity" throws an exception because it returns 
> the returnablePrice = null, because the unitPrice of the orderItem was null.
> The OUT field returnablePrice is mandatory according to the 
> service-definition. The return parameter is set but the value is null, hence 
> the exception.
> Attached is a patch that will adjust the service-deinition to allow for 
> "null" value of the OUT parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OFBIZ-9155) JobPoller does not run and hence scheduled/async jobs are never run

2017-01-20 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15831501#comment-15831501
 ] 

Leonard Lin commented on OFBIZ-9155:


[~jacques.le.roux] awesome! thank you.

> JobPoller does not run and hence scheduled/async jobs are never run
> ---
>
> Key: OFBIZ-9155
> URL: https://issues.apache.org/jira/browse/OFBIZ-9155
> Project: OFBiz
>  Issue Type: Bug
>  Components: base
>Affects Versions: 16.11.01
>Reporter: Leonard Lin
>Assignee: Jacques Le Roux
>Priority: Blocker
> Fix For: Upcoming Release, 16.11.02
>
> Attachments: StartupControlPanel.java.patch
>
>
> Symptom:
> * services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
> in the job-list and never get executed
> * scheduled jobs don't get executed
> Steps to Reproduce
> * Login to /webtools
> * Schedule a Job to run in 5 mins, (for example service 
> "clearAllEntityCaches")
> * Wait 7mins
> Expected:
> * the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
> should have status "finished"
> Actual:
> * scheduled service "clearAllEntityCaches" is still "pending"
> Analysis:
> The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
> OFBiz 16.11.01 zip file version.
> JobPoller does get started on OFBiz start but does get stuck on line:
> org.apache.ofbiz.service.job.JobPoller.java: 213-215 
> The reason is that the "Start.ServerState" never reaches "RUNNING"
> Doing a full-text scan through the whole source code shows, that there is no 
> code at all that sets the ServerState to "RUNNING"
> Comparing it to the 15.11-branch. There used to be a line:
> serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)
> no such line exists in 16.11 anymore.
> I'm not a OFBiz core developer but only develop modules.
> I attached a patch, that makes it work, but not sure if that's the best way 
> to solve the problem.
> ./framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
> line 254: add "serverState.compareAndSet(ServerState.STARTING, 
> ServerState.RUNNING);"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OFBIZ-9157) "View Order" throws exception in getReturnableQuantity

2016-12-27 Thread Leonard Lin (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-9157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonard Lin updated OFBIZ-9157:
---
Attachment: services_return.xml.patch

patch is based on 16.11 trunk version.

> "View Order" throws exception in getReturnableQuantity
> --
>
> Key: OFBIZ-9157
> URL: https://issues.apache.org/jira/browse/OFBIZ-9157
> Project: OFBiz
>  Issue Type: Bug
>  Components: order
>Affects Versions: Release Branch 15.12, Release Branch 16.11
> Environment: Encountered this but in 15.x and 16.x Trunk versions
>Reporter: Leonard Lin
>Priority: Minor
> Attachments: services_return.xml.patch
>
>
> Steps to Reproduce:
> - Create a sales order
> - Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
> - set the status of the order to completed
> - go to order-management and try to open the order for display like:
> https://localhost:8443/ordermgr/control/orderview?orderId=X
> Expected:
> - the order is displayed with status completed
> Actual:
> - A groovy exception is displayed.
> Analysis:
> The service "getReturnableQuantity" throws an exception because it returns 
> the returnablePrice = null, because the unitPrice of the orderItem was null.
> The OUT field returnablePrice is mandatory according to the 
> service-definition. The return parameter is set but the value is null, hence 
> the exception.
> Attached is a patch that will adjust the service-deinition to allow for 
> "null" value of the OUT parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OFBIZ-9157) "View Order" throws exception in getReturnableQuantity

2016-12-27 Thread Leonard Lin (JIRA)
Leonard Lin created OFBIZ-9157:
--

 Summary: "View Order" throws exception in getReturnableQuantity
 Key: OFBIZ-9157
 URL: https://issues.apache.org/jira/browse/OFBIZ-9157
 Project: OFBiz
  Issue Type: Bug
  Components: order
Affects Versions: Release Branch 16.11, Release Branch 15.12
 Environment: Encountered this but in 15.x and 16.x Trunk versions
Reporter: Leonard Lin
Priority: Minor


Steps to Reproduce:
- Create a sales order
- Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
- set the status of the order to completed
- go to order-management and try to open the order for display like:
https://localhost:8443/ordermgr/control/orderview?orderId=X

Expected:
- the order is displayed with status completed

Actual:
- A groovy exception is displayed.

Analysis:
The service "getReturnableQuantity" throws an exception because it returns the 
returnablePrice = null, because the unitPrice of the orderItem was null.
The OUT field returnablePrice is mandatory according to the service-definition. 
The return parameter is set but the value is null, hence the exception.

Attached is a patch that will adjust the service-deinition to allow for "null" 
value of the OUT parameter.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OFBIZ-7096) Inventory received are not getting reserved based on set Est. Delivery Date over Sales Order

2016-12-26 Thread Leonard Lin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-7096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15779818#comment-15779818
 ] 

Leonard Lin commented on OFBIZ-7096:


Wanted to add some use-cases comments.

I'm doing now my 2nd OFBiz implementation and in my first and 2nd 
implementation I had to skip the built-in inventory reservation system because 
of this behaviour.
As the analysis above showed there is a hierarchy fields considered which 
orders get reservation first.
There is also the priority-field which should be able to influence reservation 
as well.
I spent a lot of time to get it working, but OFBiz OOTB seems to favor 
reservation priority in "the order the sales-orders arrived".
even customizing "reserveProductInventory" wasn't enough to get it working 
reliably. 

For many cases a first-come, first-serve approach might be ok, but for more 
sophisticated JIT platforms and everywhere you have purposefully a minimum 
amount of inventory at hand the OOTB functionality does not work.

I think too, this is not a bug, but a feature.
Perhaps it can be a feature that inventory-reservation can be configurable.


> Inventory received are not getting reserved based on set Est. Delivery Date 
> over Sales Order
> 
>
> Key: OFBIZ-7096
> URL: https://issues.apache.org/jira/browse/OFBIZ-7096
> Project: OFBiz
>  Issue Type: Bug
>Reporter: Swapnil Shah
>Assignee: Divesh Dutta
>Priority: Critical
> Attachments: SO1002.png, SO1003.png, SO1004.png
>
>
> Generally system would carry multiple sales order for a SKU with different 
> Est.Delivery Date(EDD) and inventory might not be available that time when 
> orders were created/approved.
> Once we start receiving the inventory then reservations gets auto-triggered 
> and allocated based on created/approved date by overlooking the EDD 
> altogether.
> A simple scenario could be that we have 3 different orders created in system 
> at 3 different time stamps as follows and all 3 are backordered:
> Order A>> Created on 05/21 10 AM >> EDD: 5/25
> Order B>> Created on 05/21 11 AM >> EDD: 5/27
> Order C>> Created on 05/21 12 AM >> EDD: 5/23
> As soon as inventory is received it first get allocated to Order A whereas 
> Order C is supposed to ship first even though it got approved later. 
> Expected Behavior: System should first honor the EDD and if its not set then 
> use the existing criteria of honoring Created/Approved time stamp for 
> allocating the reservations
> Please refer to attached screenshots for reference



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OFBIZ-9155) JobPoller does not run and hence scheduled/async jobs are never run

2016-12-26 Thread Leonard Lin (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonard Lin updated OFBIZ-9155:
---
Attachment: StartupControlPanel.java.patch

patch that makes it work, but not sure if it's the best place to put it.

> JobPoller does not run and hence scheduled/async jobs are never run
> ---
>
> Key: OFBIZ-9155
> URL: https://issues.apache.org/jira/browse/OFBIZ-9155
> Project: OFBiz
>  Issue Type: Bug
>  Components: base
>Affects Versions: 16.11.01
>Reporter: Leonard Lin
>Priority: Blocker
> Attachments: StartupControlPanel.java.patch
>
>
> Symptom:
> * services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
> in the job-list and never get executed
> * scheduled jobs don't get executed
> Steps to Reproduce
> * Login to /webtools
> * Schedule a Job to run in 5 mins, (for example service 
> "clearAllEntityCaches")
> * Wait 7mins
> Expected:
> * the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
> should have status "finished"
> Actual:
> * scheduled service "clearAllEntityCaches" is still "pending"
> Analysis:
> The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
> OFBiz 16.11.01 zip file version.
> JobPoller does get started on OFBiz start but does get stuck on line:
> org.apache.ofbiz.service.job.JobPoller.java: 213-215 
> The reason is that the "Start.ServerState" never reaches "RUNNING"
> Doing a full-text scan through the whole source code shows, that there is no 
> code at all that sets the ServerState to "RUNNING"
> Comparing it to the 15.11-branch. There used to be a line:
> serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)
> no such line exists in 16.11 anymore.
> I'm not a OFBiz core developer but only develop modules.
> I attached a patch, that makes it work, but not sure if that's the best way 
> to solve the problem.
> ./framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
> line 254: add "serverState.compareAndSet(ServerState.STARTING, 
> ServerState.RUNNING);"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OFBIZ-9155) JobPoller does not run and hence scheduled/async jobs are never run

2016-12-26 Thread Leonard Lin (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonard Lin updated OFBIZ-9155:
---
Description: 
Symptom:
* services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
in the job-list and never get executed
* scheduled jobs don't get executed

Steps to Reproduce
* Login to /webtools
* Schedule a Job to run in 5 mins, (for example service "clearAllEntityCaches")
* Wait 7mins

Expected:
* the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
should have status "finished"

Actual:
* scheduled service "clearAllEntityCaches" is still "pending"

Analysis:
The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
OFBiz 16.11.01 zip file version.

JobPoller does get started on OFBiz start but does get stuck on line:
org.apache.ofbiz.service.job.JobPoller.java: 213-215 

The reason is that the "Start.ServerState" never reaches "RUNNING"

Doing a full-text scan through the whole source code shows, that there is no 
code at all that sets the ServerState to "RUNNING"

Comparing it to the 15.11-branch. There used to be a line:
serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)

no such line exists in 16.11 anymore.

I'm not a OFBiz core developer but only develop modules.
I attached a patch, that makes it work, but not sure if that's the best way to 
solve the problem.

./framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java

line 254: add "serverState.compareAndSet(ServerState.STARTING, 
ServerState.RUNNING);"




  was:
Symptom:
* services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
in the job-list and never get executed
* scheduled jobs don't get executed

Steps to Reproduce
* Login to /webtools
* Schedule a Job to run in 5 mins, (for example service "clearAllEntityCaches")
* Wait 7mins

Expected:
* the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
should have status "finished"

Actual:
* scheduled service "clearAllEntityCaches" is still "pending"

Analysis:
The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
OFBiz 16.11.01 zip file version.

JobPoller does get started on OFBiz start but does get stuck on line:
org.apache.ofbiz.service.job.JobPoller.java: 213-215 

The reason is that the "Start.ServerState" never reaches "RUNNING"

Doing a full-text scan through the whole source code shows, that there is no 
code at all that sets the ServerState to "RUNNING"

Comparing it to the 15.11-branch. There used to be a line:
serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)

no such line exists in 16.11 anymore.

I'm not a OFBiz core developer but only develop modules.
I try to develop a patch and submit on this ticket.


> JobPoller does not run and hence scheduled/async jobs are never run
> ---
>
> Key: OFBIZ-9155
> URL: https://issues.apache.org/jira/browse/OFBIZ-9155
> Project: OFBiz
>  Issue Type: Bug
>  Components: base
>Affects Versions: 16.11.01
>Reporter: Leonard Lin
>Priority: Blocker
> Attachments: StartupControlPanel.java.patch
>
>
> Symptom:
> * services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
> in the job-list and never get executed
> * scheduled jobs don't get executed
> Steps to Reproduce
> * Login to /webtools
> * Schedule a Job to run in 5 mins, (for example service 
> "clearAllEntityCaches")
> * Wait 7mins
> Expected:
> * the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
> should have status "finished"
> Actual:
> * scheduled service "clearAllEntityCaches" is still "pending"
> Analysis:
> The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
> OFBiz 16.11.01 zip file version.
> JobPoller does get started on OFBiz start but does get stuck on line:
> org.apache.ofbiz.service.job.JobPoller.java: 213-215 
> The reason is that the "Start.ServerState" never reaches "RUNNING"
> Doing a full-text scan through the whole source code shows, that there is no 
> code at all that sets the ServerState to "RUNNING"
> Comparing it to the 15.11-branch. There used to be a line:
> serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)
> no such line exists in 16.11 anymore.
> I'm not a OFBiz core developer but only develop modules.
> I attached a patch, that makes it work, but not sure if that's the best way 
> to solve the problem.
> ./framework/start/src/main/java/org/apache/ofbiz/base/start/StartupControlPanel.java
> line 254: add "serverState.compareAndSet(ServerState.STARTING, 
> ServerState.RUNNING);"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OFBIZ-9155) JobPoller does not run and hence scheduled/async jobs are never run

2016-12-26 Thread Leonard Lin (JIRA)
Leonard Lin created OFBIZ-9155:
--

 Summary: JobPoller does not run and hence scheduled/async jobs are 
never run
 Key: OFBIZ-9155
 URL: https://issues.apache.org/jira/browse/OFBIZ-9155
 Project: OFBiz
  Issue Type: Bug
  Components: base
Affects Versions: 16.11.01
Reporter: Leonard Lin
Priority: Blocker


Symptom:
* services that are invoked with "dispatcher.runAsync" seem to stay "pending" 
in the job-list and never get executed
* scheduled jobs don't get executed

Steps to Reproduce
* Login to /webtools
* Schedule a Job to run in 5 mins, (for example service "clearAllEntityCaches")
* Wait 7mins

Expected:
* the scheduled service "clearAllEntityCaches" is not "pending" anymore but 
should have status "finished"

Actual:
* scheduled service "clearAllEntityCaches" is still "pending"

Analysis:
The problem can be reproduced with the OFBiz 16.11-trunk as well as with the 
OFBiz 16.11.01 zip file version.

JobPoller does get started on OFBiz start but does get stuck on line:
org.apache.ofbiz.service.job.JobPoller.java: 213-215 

The reason is that the "Start.ServerState" never reaches "RUNNING"

Doing a full-text scan through the whole source code shows, that there is no 
code at all that sets the ServerState to "RUNNING"

Comparing it to the 15.11-branch. There used to be a line:
serverState.compareAndSet(ServerState.STARTING, ServerState.RUNNING)

no such line exists in 16.11 anymore.

I'm not a OFBiz core developer but only develop modules.
I try to develop a patch and submit on this ticket.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)