Openbravo Issue Tracking System - Modules
View Issue Details
0040873ModulesZoho Reports Integrationpublic2019-05-14 12:522019-05-17 08:37
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
alostale
0040873: Adapt ImportData process to the new way of serializing the ProcessBundle parameters
With the changes introduced to remove the xstream library(0039034), the ProcessBundle parameters are now serialized in a different way. The ImportData process must support this new way, keeping also backwards compatibility for those processes already scheduled before these changes.
1) Install Zoho in an environment with the xstream removal changes. The following repo may be used: https://code.openbravo.com/erp/devel/pi-remove-xstream [^]
2) As system administrator, go to the Zoho Integration window and create the configuration.
3) Schedule an import process. Note that it fails. The following error is shown in the log:

[DefaultQuartzScheduler_Worker-2] ERROR org.openbravo.utility.zoho.process.ImportData - Error importing to Zoho
java.lang.IllegalArgumentException: id to load is required for loading
    at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:93) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.event.spi.LoadEvent.<init>(LoadEvent.java:63) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.doLoad(SessionImpl.java:2927) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.lambda$load$1(SessionImpl.java:2911) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.perform(SessionImpl.java:2867) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2911) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.hibernate.internal.SessionImpl.get(SessionImpl.java:1102) ~[hibernate-core-5.4.2.Final.jar:5.4.2.Final]
    at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:534) ~[classes/:?]
    at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:500) ~[classes/:?]
    at org.openbravo.dal.service.OBDal.get(OBDal.java:359) ~[classes/:?]
    at org.openbravo.utility.zoho.process.ImportData.doExecute(ImportData.java:41) [classes/:?]
No tags attached.
related to design defect 0039034 closed caristu Openbravo ERP Illegal Access warning in xstream-1.3.1 library 
Issue History
2019-05-14 12:52caristuNew Issue
2019-05-14 12:52caristuAssigned To => platform
2019-05-14 12:54caristuDescription Updatedbug_revision_view_page.php?rev_id=18766#r18766
2019-05-14 12:54caristuRelationship addedrelated to 0039034
2019-05-14 12:55caristuDescription Updatedbug_revision_view_page.php?rev_id=18767#r18767
2019-05-14 13:01hgbotCheckin
2019-05-14 13:01hgbotNote Added: 0111670
2019-05-14 13:01caristuAssigned Toplatform => caristu
2019-05-14 13:01caristuReview Assigned To => alostale
2019-05-14 16:00caristuStatusnew => scheduled
2019-05-14 16:01caristuNote Added: 0111672
2019-05-14 16:01caristuStatusscheduled => resolved
2019-05-14 16:01caristuResolutionopen => fixed
2019-05-14 16:01caristuNote Edited: 0111672bug_revision_view_page.php?bugnote_id=0111672#r18774
2019-05-17 08:37alostaleNote Added: 0111758
2019-05-17 08:37alostaleStatusresolved => closed

Notes
(0111670)
hgbot   
2019-05-14 13:01   
Repository: erp/pmods/org.openbravo.utility.zoho
Changeset: 1f8a8f97207825541e80bbbfb3adc7fced1327e9
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 14 12:59:30 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.utility.zoho/rev/1f8a8f97207825541e80bbbfb3adc7fced1327e9 [^]

related to issue 40873: minor code improvements

  - Use diamond operator
  - Reorder the modifiers of the "log4j" attribute to comply with the Java Language Specification
  - Update copyright year

---
M src/org/openbravo/utility/zoho/process/ImportData.java
---
(0111672)
caristu   
2019-05-14 16:01   
Repository: erp/pmods/org.openbravo.utility.zoho
Changeset: caeba34937bc
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue May 14 13:41:11 2019 +0200
URL: https://code.openbravo.com/erp/pmods/org.openbravo.utility.zoho/rev/caeba34937bc [^]

fixes issues 40873: support new serialization of ProcessBundle params

The ImportData process now has the logic to retrieve the zohoImportId parameter when receiving the map of parameters recovered from both the String representation that was done by xtream (this will be used for the already scheduled process) and the new representation done after the removal of xstream[1].

Besides, now by default the parameters of the process bundle are generated with the new format.

[1] https://issues.openbravo.com/view.php?id=39034 [^]

---
M src/org/openbravo/utility/zoho/process/ImportData.java
M src/org/openbravo/utility/zoho/process/ZohoProcessCallout.java
---

(0111758)
alostale   
2019-05-17 08:37   
reviewed + tested