Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019905Openbravo ERPA. Platformpublic2012-02-28 17:552012-03-05 13:37
plujan 
vmromanos 
immediatemajorsometimes
closedfixed 
5
pi 
 
Mozilla Firefox
Core
No
0019905: JSON exception on Add Details button for Payment Out window
When creating a new Payment Out for a Purchase Order, an error is popped out. This error does not happen always manually but the smoke tests found it in every run. See steps.


The openbravo log shows the following exception:

2012-02-28 13:48:14,815 [ajp-8009-2] ERROR org.openbravo.advpaymentmngt.ad_actionbutton.AddOrderOrInvoice - Error parsing received GLItems JSON A
org.codehaus.jettison.json.JSONException: A JSONArray text must start with '[' at character 0 of
        at org.codehaus.jettison.json.JSONTokener.syntaxError(JSONTokener.java:439)
        at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:98)
        at org.codehaus.jettison.json.JSONArray.<init>(JSONArray.java:137)
        at org.openbravo.advpaymentmngt.ad_actionbutton.AddOrderOrInvoice.doPost(AddOrderOrInvoice.java:120)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
        at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:422)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java
        at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
        at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:7
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
        at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.j
        at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
        at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.jav
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:42
        at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(Ajp
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:15
        at java.lang.Thread.run(Thread.java:619)
1. Login as QAAdmin user
2. Go to Purchase Order window
3. Create a new Purchase Order with the following data:
   Business Partner: Vendor A
   Payment Method: 1 (Spain)
   Payment Terms: 90 days
4. Add a line with the following data:
   Product: Raw Material A
   Ordered Quantity: 11.2
5. Save and Book the Order
6. Close the Purchase Order window and open Payment Out window
7. Create a new Payment for Business Partner: Vendor A and Save
8. Click the Add Details button
9. On the pop up window, choose Transaction Type: Orders
10. Mark the order created in step 5 and click Process
11. In the Process Payment pop up click Ok
12. An error is displayed (see attached screenshot)
13. Repeat steps 8 to 11. Now the error does not happen and the expected success message is shown.
No tags attached.
related to defect 00199423.0MP9 closed iperdomo JavaScript errors on Add Details button for Payment Out window 
png PaymentOutError.png (88,513) 2012-02-28 17:55
https://issues.openbravo.com/file_download.php?file_id=5032&type=bug
png
Issue History
2012-02-28 17:55plujanNew Issue
2012-02-28 17:55plujanAssigned To => alostale
2012-02-28 17:55plujanFile Added: PaymentOutError.png
2012-02-28 17:55plujanWeb browser => Mozilla Firefox
2012-02-28 17:55plujanModules => Core
2012-02-28 18:02alostaleAssigned Toalostale => vmromanos
2012-02-29 11:51vmromanosStatusnew => scheduled
2012-02-29 11:51vmromanosNote Added: 0045580
2012-02-29 11:51vmromanosfix_in_branch => pi
2012-02-29 12:48hgbotCheckin
2012-02-29 12:48hgbotNote Added: 0045587
2012-02-29 12:48hgbotStatusscheduled => resolved
2012-02-29 12:48hgbotResolutionopen => fixed
2012-02-29 12:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/36954df33011f5ba447f683962b9f4c0cdd79635 [^]
2012-02-29 12:53vmromanosNote Added: 0045589
2012-03-02 15:40hudsonbotCheckin
2012-03-02 15:40hudsonbotNote Added: 0045982
2012-03-05 13:30plujanIssue cloned0019942
2012-03-05 13:30plujanRelationship addedrelated to 0019942
2012-03-05 13:37gorkaionNote Added: 0046039
2012-03-05 13:37gorkaionStatusresolved => closed

Notes
(0045580)
vmromanos   
2012-02-29 11:51   
I am able to reproduce it only under a heavy load.
It looks like a performance issue in this popup
(0045587)
hgbot   
2012-02-29 12:48   
Repository: erp/devel/pi
Changeset: 36954df33011f5ba447f683962b9f4c0cdd79635
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Feb 29 12:47:29 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/36954df33011f5ba447f683962b9f4c0cdd79635 [^]

Fixed bug 19905: JSON exception on Add Details button for Payment Out window
Ensure OB.APRM.APFT_GLItems is not undefined when submitting to the server

In case the GL Item selector is not properly load (for example, because of a performance
issue), the value assigned to OB.APRM.APFT_GLItems was undefined. After the fix, if
OB.APRM.APFT_GLItems is undefined, we set it to []

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
---
(0045589)
vmromanos   
2012-02-29 12:53   
No regression risk.

Test plan 1:
1. Ensure your client and/or server machine is under a heavy load.
For example, inside a python interpreter session, run:
$ python
>>> 99999999999999999999999999999 ** 99999999999999999999999999999
2. Follow the proposed steps to reproduce

Test plan 2:
3. Try adding some GL/Items to the window, then removed them

Test plan 3:
4. Include only payment details related to GL/Items

Test plan 4:
5. Include payment details mixing orders, invoices and GL/Items
(0045982)
hudsonbot   
2012-03-02 15:40   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/544d64e0c159 [^]

Maturity status: Test
(0046039)
gorkaion   
2012-03-05 13:37   
reviewed and tested