Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036009Openbravo ERP07. Sales managementpublic2017-05-16 13:032017-06-08 10:04
caristu 
caristu 
highmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0036009: Product selector in Stock Report is not working when using Tomcat 7.0.76 or higher
Product selector in Stock Report is not working when using Tomcat 7.0.76 or higher. The following error stack trace is shown after opening the selector pop-up:

java.lang.ClassCastException: org.apache.catalina.util.ParameterMap cannot be cast to java.util.HashMap
    at org.openbravo.erpCommon.info.ProductMultiple.isCalledFromSoTrx(ProductMultiple.java:437)
    at org.openbravo.erpCommon.info.ProductMultiple.doPost(ProductMultiple.java:72)
    at org.openbravo.base.HttpBaseServlet.doGet(HttpBaseServlet.java:294)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:455)

This is caused due to a change introduced in Tomcat 7.0.76[1]. The ParameterMap[2] class is no longer extending HashMap.

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60808 [^]
[2] https://github.com/apache/tomcat/commit/4e6c21d4f2fef36885d9f4945b31c38c30a95adf#diff-f426585723df91288b2aec48c27124e2 [^]
1) Deploy Openbravo in Tomcat 7.0.76 or higher
2) Open the [Stock Report] window
3) Open the Product selector pop-up
Do not perform the cast to HashMap with this expression: request.getParameterMap().
No tags attached.
related to defect 00221663.0MP21 closed ioritzCia Wrong behaviour in the product selector of 'Product selector' in Sales order reports 
png classCastException.png (27,699) 2017-05-16 13:03
https://issues.openbravo.com/file_download.php?file_id=10763&type=bug
png
Issue History
2017-05-16 13:03caristuNew Issue
2017-05-16 13:03caristuAssigned To => platform
2017-05-16 13:03caristuModules => Core
2017-05-16 13:03caristuTriggers an Emergency Pack => No
2017-05-16 13:03caristuFile Added: classCastException.png
2017-05-16 13:03caristuRelationship addedrelated to 0022166
2017-05-16 13:04caristuProposed Solution updated
2017-05-16 13:05caristuDescription Updatedbug_revision_view_page.php?rev_id=15173#r15173
2017-05-16 13:07caristuDescription Updatedbug_revision_view_page.php?rev_id=15174#r15174
2017-05-16 13:10caristuDescription Updatedbug_revision_view_page.php?rev_id=15175#r15175
2017-05-16 13:10caristuDescription Updatedbug_revision_view_page.php?rev_id=15176#r15176
2017-05-16 13:11caristuDescription Updatedbug_revision_view_page.php?rev_id=15177#r15177
2017-05-16 13:18caristuDescription Updatedbug_revision_view_page.php?rev_id=15178#r15178
2017-05-16 13:30caristuAssigned Toplatform => caristu
2017-05-16 13:31hgbotCheckin
2017-05-16 13:31hgbotNote Added: 0096620
2017-05-16 13:31hgbotStatusnew => resolved
2017-05-16 13:31hgbotResolutionopen => fixed
2017-05-16 13:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ac217114d34d44f7c5e4e6ff770a685e9afe65b [^]
2017-05-16 13:31caristuCategoryA. Platform => 07. Sales management
2017-05-16 13:32caristuReview Assigned To => aferraz
2017-05-16 17:17hgbotCheckin
2017-05-16 17:17hgbotNote Added: 0096623
2017-05-16 18:05aferrazNote Added: 0096625
2017-05-16 18:05aferrazStatusresolved => closed
2017-05-16 18:05aferrazFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096968
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096970
2017-06-08 10:00alostaleRelationship addedrelated to 0036192
2017-06-08 10:04alostaleRelationship deletedrelated to 0036192

Notes
(0096620)
hgbot   
2017-05-16 13:31   
Repository: erp/devel/pi
Changeset: 4ac217114d34d44f7c5e4e6ff770a685e9afe65b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 16 13:28:29 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ac217114d34d44f7c5e4e6ff770a685e9afe65b [^]

fixes bug 36009: Manual product selector not working in Tomcat 7.0.76 or higher

Several improvements in isCalledFromSoTrx method:
- Avoid unnecessary casting to HashMap to fix the issue
- Use enhanced for-loop instead of using Iterator
- Return the result directly when the "issotrx" parameter is found

---
M src/org/openbravo/erpCommon/info/ProductMultiple.java
---
(0096623)
hgbot   
2017-05-16 17:17   
Repository: erp/devel/pi
Changeset: f2ce1dbf54a3d2d65149e10ab4ff395e2357b707
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue May 16 17:16:27 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f2ce1dbf54a3d2d65149e10ab4ff395e2357b707 [^]

Related to issue 36009: Update copyright year

---
M src/org/openbravo/erpCommon/info/ProductMultiple.java
---
(0096625)
aferraz   
2017-05-16 18:05   
Code review + Testing OK
(0096968)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0096970)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test