Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0043818 | Retail Modules | Retail API | public | 2020-04-22 10:03 | 2020-06-03 10:23 |
Reporter | santi_lozano | ||||
Assigned To | prakashmurugesan88 | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | RR20Q3 | |||
Merge Request Status | |||||
Review Assigned To | marvintm | ||||
OBNetwork customer | Gold | ||||
Support ticket | 15697 | ||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0043818: Error thrown using Retail API module for Business Partner POST method filling example values | ||||
Description | Error (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 [^] | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=14357&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=14358&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=14359&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=14360&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=14485&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=14486&type=bug | ||||
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 | OBNetwork customer | => OBPS | ||
2020-04-22 10:03 | santi_lozano | Support ticket | => 15697 | ||
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 | bug_revision_view_page.php?rev_id=20832#r20832 | ||
2020-04-22 10:05 | santi_lozano | Description Updated | bug_revision_view_page.php?rev_id=20834#r20834 | ||
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 | bug_revision_view_page.php?rev_id=20835#r20835 | ||
2020-04-22 11:27 | santi_lozano | OBNetwork customer | OBPS => Gold | ||
2020-04-22 11:42 | guillermogil | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=20838#r20838 | ||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|