Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023023Openbravo ERPA. Platformpublic2013-02-11 11:012013-02-20 04:49
malsasua 
AugustoMauch 
highmajoralways
closedfixed 
20Community Appliance
 
3.0MP20 
shankarb
Google Chrome
Core
QA functional test
2013-01-10
https://code.openbravo.com/erp/devel/pi/rev/22e7a5c9fbda [^]
No
0023023: Error to insert an USER calling to web service
if you try insert an user calling to the WS
http://servername:8080/openbravo/ws/dal/ADUser [^]
error is returned:
org.openbravo.service.web.InvalidContentException: Exception when parsing entity ADUser (null):id to load is required for loading
Exception when parsing entity ADUser (null):id to load is required for loading
Caused by: Exception when parsing entity ADUser (null):id to load is required for loading
Exception when parsing entity ADUser (null):id to load is required for loading

. call to WS http://servername:8080/openbravo/ws/dal/ADUser [^] (method POST) using the xml attached (sampeCallWS.txt)
. diff attached
No tags attached.
txt sampeCallWS.txt (406) 2013-02-11 11:01
https://issues.openbravo.com/file_download.php?file_id=5962&type=bug
diff diffCallWS.diff (409) 2013-02-11 11:02
https://issues.openbravo.com/file_download.php?file_id=5963&type=bug
Issue History
2013-02-11 11:01malsasuaNew Issue
2013-02-11 11:01malsasuaAssigned To => AugustoMauch
2013-02-11 11:01malsasuaFile Added: sampeCallWS.txt
2013-02-11 11:01malsasuaWeb browser => Google Chrome
2013-02-11 11:01malsasuaModules => Core
2013-02-11 11:01malsasuaTriggers an Emergency Pack => No
2013-02-11 11:02malsasuaFile Added: diffCallWS.diff
2013-02-11 11:23AugustoMauchWeb browserGoogle Chrome => Google Chrome
2013-02-11 11:23AugustoMauchRegression level => QA functional test
2013-02-11 11:23AugustoMauchRegression date => 2013-01-10
2013-02-11 11:23AugustoMauchRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/22e7a5c9fbda [^]
2013-02-11 15:23AugustoMauchIssue Monitored: shankarb
2013-02-11 15:23AugustoMauchReview Assigned To => shankarb
2013-02-11 15:23AugustoMauchWeb browserGoogle Chrome => Google Chrome
2013-02-11 15:26AugustoMauchNote Added: 0056336
2013-02-11 15:27hgbotCheckin
2013-02-11 15:27hgbotNote Added: 0056337
2013-02-11 15:27hgbotStatusnew => resolved
2013-02-11 15:27hgbotResolutionopen => fixed
2013-02-11 15:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fe46ee66e77ade9de62d8c7118af74ec8c5a3bd9 [^]
2013-02-12 04:46shankarbNote Added: 0056354
2013-02-12 04:46shankarbStatusresolved => closed
2013-02-12 04:46shankarbFixed in Version => 3.0MP20
2013-02-20 04:49hudsonbotCheckin
2013-02-20 04:49hudsonbotNote Added: 0056562

Notes
(0056336)
AugustoMauch   
2013-02-11 15:26   
Test plan:

Check that it is possible to add a new user using the Openbravo REST webservices. To do that, you can install the Chrome Poster extension, and configure it this way:
URL: http://youropenbravodomain/ws/dal/ADUser [^]
Content body:
<?xml version="1.0" encoding="UTF-8"?>
<ob:Openbravo xmlns:ob="http://www.openbravo.com"> [^]
<ADUser>
<active>true</active>
<firstName>xxxName User</firstName>
<lastName>xxxLastName User</lastName>
<email>xxxmail@user.com</email>
<phone>xxx123456</phone>
<position>xxxConsultan</position>
<businessPartner id="2C4C71BC828B47A0AF2A79855FD3BA7A" />
<name>xxxName User Last Name</name>
</ADUser>
</ob:Openbravo>

After filling this fields, click on the POST button and the new user should be added to the AD_USER table.
(0056337)
hgbot   
2013-02-11 15:27   
Repository: erp/devel/pi
Changeset: fe46ee66e77ade9de62d8c7118af74ec8c5a3bd9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Feb 11 15:23:11 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fe46ee66e77ade9de62d8c7118af74ec8c5a3bd9 [^]

Fixes issue 23023: NPE no longer thrown when using REST webservices to add rows

In the resolve function of the EntityResolver class, OBDal.getInstance().get(entityName, id) was being executed without checking if the id was null.

---
M src/org/openbravo/dal/xml/EntityResolver.java
---
(0056354)
shankarb   
2013-02-12 04:46   
Code Reviewed and verified in pi changeset fda0bc8e8d80.
(0056562)
hudsonbot   
2013-02-20 04:49   
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/d828167a9e83 [^]

Maturity status: Test