Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0043818
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2020-04-22 10:032020-06-03 10:23
Reportersanti_lozanoView Statuspublic 
Assigned Toprakashmurugesan88 
PriorityhighResolutionfixedFixed in VersionRR20Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0043818: Error thrown using Retail API module for Business Partner POST method filling example values

DescriptionError (see code below) using Retail API for a POST request that creates BussinesPartner items.
Create a POST request to:
https://livebuilds.openbravo.com/retail_modules_pgsql_pi/ws/org.openbravo.retail.api.ImportService/BusinessPartner [^]
With the example data (filling the fields for the concrete role):
https://livebuilds.openbravo.com/retail_modules_pgsql_pi/api?urls.primaryName=RetailAPI#/BusinessPartner/Import_BusinessPartner [^]
Then error is thrown on EDL Request window:
"Error while importing an item: class java.lang.String cannot be cast to class org.openbravo.base.structure.BaseOBObject (java.lang.String is in module java.base of loader 'bootstrap'; org.openbravo.base.structure.BaseOBObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @6a3aab04)”
Steps To Reproduce* go to livebuilds, enter with role The White Valley Group Admin:
https://livebuilds.openbravo.com/retail_modules_pgsql_pi/ [^]
* go to Role window, set on main header Is Web Service Enabled for role The White Valley Group Admin
* go to EDL Configuration, create a new record. EDL Process = JSON Based Import Process, Active = yes
* go to tab Output, create a new one with default values (Sequence Number = 10, Output Type = Debug, Active = yes)
* open Postman program (see screenshot), create a new request. Type POST. Url request = https://livebuilds.openbravo.com/retail_modules_pgsql_pi/ws/org.openbravo.retail.api.ImportService/BusinessPartner [^]
* open tab Authorization (Postman) type = Basic Auth, Username and Password for Openbravo livebuilds.
* open tab Body (Postman), set raw button checked, and Text on the drop-down list. Copy and paste that content:

[{"client":"39363B0921BB4293B48383844325E84C","organization":"67839EEFA49E44AC969BD60093FCC899","searchKey":"SNItest SNItest","commercialName":"test","fiscalName":"","description":"Description test","bpCategory":"B1DD8B371643421C987EF1D5B358D5E9","taxID":"","greeting":"Monsieur","currency":"102","birthDay":"1992-01-09","paymentMethod":"45A202BF44884F05B8A1BF741E2063B6","paymentTerms":"D8955F8808A54C63BBF478A6843D834D","priceList":"496CF965DF9744D2A41248392D1DE407","customerConsent":"Y","creditLineLimit":0,"currentBalance":0,"invoiceTerms":"I","locations":[{"address":"102 test street","city":"Barcelona","zipCode":"08028","country":"102","region":"A44A7F2FCFD34CC78DC5546B067CD816"}],"contactInformation":[{"firstName":"Patrik","lastName":"Mils","phone":"65986597","email":"patrik.mils@practicsbs.com"}]}]

* Go to Openbravo livebuilds, with role The White Valley Group Admin, enter to EDL request window, check if the record has been sent here. Otherwise it has been sent to F&B International Group role, change to that role, and create a new request with Postman to make values for that role coincide, fill the request with the following

[{
    "client": "23C59575B9CF467C9620760EB255B389",
    "organization": "0",
    "searchKey": "10001-001",
    "commercialName": "Patrik Mils",
    "fiscalName": "Patrik Mils",
    "description": "Description test",
    "bpCategory": "713643BF6582479BAD2AF21B80836AA2",
    "taxID": "1234569586A",
    "greeting": "Monsieur",
    "currency": "102",
    "birthDay": "1992-01-09",
    "paymentMethod": "A97CFD2AFC234B59BB0A72189BD8FC2A",
    "paymentTerms": "66BA1164A7394344BB9CD1A6ECEED05D",
    "priceList": "AEE66281A08F42B6BC509B8A80A33C29",
    "customerConsent": "Y",
    "creditLineLimit": 0,
    "currentBalance": 0,
    "invoiceTerms": "I",
    "locations": [{
        "address": "102 test street",
        "city": "Barcelona",
        "zipCode": "08028",
        "country": "102",
        "region": "A44A7F2FCFD34CC78DC5546B067CD816"
    }],
    "contactInformation": [{
        "firstName": "Patrik",
        "lastName": "Mils",
        "phone": "65986597",
        "email": "patrik.mils@practicsbs.com"
    }]
}]

* then the error is raised on the corresponding role EDL request window:
"Error while importing an item: class java.lang.String cannot be cast to class org.openbravo.base.structure.BaseOBObject (java.lang.String is in module java.base of loader 'bootstrap'; org.openbravo.base.structure.BaseOBObject is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @6a3aab04)"

* note that for the request we have been using the Swagger UI proposed by Retail API module, just filling the string data with values that match for that role
https://livebuilds.openbravo.com/retail_modules_pgsql_pi/api?urls.primaryName=RetailAPI#/BusinessPartner/Import_BusinessPartner [^]
TagsNo tags attached.
Attached Filespng file icon issue - postman.png [^] (113,100 bytes) 2020-04-22 10:06


png file icon issue - is web service enabled.png [^] (165,418 bytes) 2020-04-22 10:06


png file icon issue - error.png [^] (234,779 bytes) 2020-04-22 10:06


png file icon issue - edl configuration.png [^] (106,580 bytes) 2020-04-22 10:06


patch file icon I43818_Export.patch [^] (36,414 bytes) 2020-05-15 09:02 [Show Content]
patch file icon I43818_Import.patch [^] (37,642 bytes) 2020-05-15 09:03 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0119957)
hgbot (developer)
2020-05-18 07:57

Repository: erp/pmods/org.openbravo.retail.api
Changeset: da7291db4dfccee866eeb63a49a2eb32b0cc3707
Author: Prakash M <prakash <at> qualiantech.com>
Date: Sat May 16 16:12:50 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/da7291db4dfccee866eeb63a49a2eb32b0cc3707 [^]

Related to BUG-43818: Fixed error on importing Business Partner

* Created new Entity Mapping for "Greeting" [Export & Import]
* In BusinessPartner Entity Mapping, Changed mapping of "Greeting" property from
DirectPropertyMapping to EntityMapping [Export & Import]
* In ADUser Entity Mapping, included new Java property mapping for the name
property. Therefore name generated dynamically from firstName and lastName of
contactInfo. [Import]
* Changes BusinessPartner locations property to java property
mapping [Import]

---
M api/org.openbravo.retail.api-RetailAPI.json
M src-db/database/sourcedata/OBEI_ENTITY_MAPPING.xml
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
A src/org/openbravo/retail/api/mappings/businesspartner/ImportBusinessPartnerJavaPropertyMappingHandler.java
A src/org/openbravo/retail/api/mappings/user/ImportUserJavaPropertyMappingHandler.java
---
(0119967)
hgbot (developer)
2020-05-18 11:49

Repository: erp/pmods/org.openbravo.retail.api
Changeset: e20157190d2c0a19ce6fe3ec30df8f1fd374d9db
Author: Prakash M <prakash <at> qualiantech.com>
Date: Mon May 18 15:19:16 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/e20157190d2c0a19ce6fe3ec30df8f1fd374d9db [^]

Related to BUG-43818: Included name property in BPartner location expected data
of retail api test

---
M src-test/data/export/filter/bpartner/BPartnerByBPartnerCategory.json
M src-test/data/export/filter/bpartner/BPartnerById.json
M src-test/data/export/filter/bpartner/BPartnerByName.json
M src-test/data/export/filter/bpartner/BPartnerByOrg.json
M src-test/data/export/filter/bpartner/BPartnerBySearchKey.json
M src-test/data/export/filter/bpartner/BPartnerByStoreId.json
M src-test/data/export/filter/bpartner/BPartnerByStoreName.json
M src-test/data/export/filter/bpartner/BPartnerByStoreSearchKey.json
---
(0120107)
hgbot (developer)
2020-05-20 19:25

Repository: erp/pmods/org.openbravo.retail.api
Changeset: edd6e23b50202fc9161534924613026e811f2834
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed May 20 18:54:37 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/edd6e23b50202fc9161534924613026e811f2834 [^]

Related to BUG 43818: minor code improvements

---
M src/org/openbravo/retail/api/mappings/businesspartner/ImportBusinessPartnerJavaPropertyMappingHandler.java
---
(0120568)
hgbot (developer)
2020-06-03 10:23

Repository: erp/pmods/org.openbravo.retail.api
Changeset: 5350f0199751795c42e05ca8ee9741284cdcbbb0
Author: Prakash M <prakash <at> qualiantech.com>
Date: Wed Jun 03 13:52:26 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.api/rev/5350f0199751795c42e05ca8ee9741284cdcbbb0 [^]

Related to BUG-43818: Changed country query by validating isocode with ilike
instead of equals

---
M src/org/openbravo/retail/api/mappings/businesspartner/ImportBusinessPartnerJavaPropertyMappingHandler.java
---

- Issue History
Date Modified Username Field Change
2020-04-22 10:03 santi_lozano New Issue
2020-04-22 10:03 santi_lozano Assigned To => Retail
2020-04-22 10:03 santi_lozano Resolution time => 1589320800
2020-04-22 10:03 santi_lozano Triggers an Emergency Pack => No
2020-04-22 10:03 santi_lozano Steps to Reproduce Updated View Revisions
2020-04-22 10:05 santi_lozano Description Updated View Revisions
2020-04-22 10:06 santi_lozano File Added: issue - postman.png
2020-04-22 10:06 santi_lozano File Added: issue - is web service enabled.png
2020-04-22 10:06 santi_lozano File Added: issue - error.png
2020-04-22 10:06 santi_lozano File Added: issue - edl configuration.png
2020-04-22 10:09 santi_lozano Steps to Reproduce Updated View Revisions
2020-04-22 11:42 guillermogil Steps to Reproduce Updated View Revisions
2020-05-05 07:47 prakashmurugesan88 Assigned To Retail => prakashmurugesan88
2020-05-05 15:24 prakashmurugesan88 Status new => scheduled
2020-05-15 09:02 prakashmurugesan88 File Added: I43818_Export.patch
2020-05-15 09:03 prakashmurugesan88 File Added: I43818_Import.patch
2020-05-18 07:57 hgbot Checkin
2020-05-18 07:57 hgbot Note Added: 0119957
2020-05-18 08:00 prakashmurugesan88 Status scheduled => resolved
2020-05-18 08:00 prakashmurugesan88 Resolution open => fixed
2020-05-18 08:30 marvintm Review Assigned To => marvintm
2020-05-18 08:30 marvintm Status resolved => closed
2020-05-18 08:30 marvintm Fixed in Version => RR20Q3
2020-05-18 11:49 hgbot Checkin
2020-05-18 11:49 hgbot Note Added: 0119967
2020-05-20 19:25 hgbot Checkin
2020-05-20 19:25 hgbot Note Added: 0120107
2020-06-03 10:23 hgbot Checkin
2020-06-03 10:23 hgbot Note Added: 0120568


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker