Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0016531 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | minor | sometimes | 2011-03-29 13:13 | 2011-06-13 10:57 | |||
| Reporter | adrianromero | View Status | public | |||||
| Assigned To | dalsasua | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | 3.0MP0 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | 7d9ed704c9ce | ||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | pi | SCM revision | ||||||
| Merge Request Status | ||||||||
| Review Assigned To | ||||||||
| OBNetwork customer | OBPS | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | ||||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0016531: Cannot use null in a BaseOBObject parameter when calling a procedure | |||||||
| Description | When using the class CallStoredProcedure to call a procedure and passing NULL in a parameter of type BaseOBObject an error is returned. If the value is not null it works | |||||||
| Steps To Reproduce | When calling a procedure pass a parameter using the following code: types.add(org.openbravo.model.common.currency.ConversionRate.class); parameters.add(null); The problem is in the method getSQLType that raises an exception. In this particular case VARCHAR must be returned. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
||||||||
|
||||||||
Notes |
|
|
(0035335) maite (viewer) 2011-03-29 15:58 |
support_ticket=10946 due_date=03/06/2011 |
|
(0035433) hgbot (developer) 2011-03-31 17:26 |
Repository: erp/devel/pi Changeset: 7d9ed704c9ceb4df05b49f73fac52ccf63d5f062 Author: Adrián Romero <adrianromero <at> openbravo.com> Date: Thu Mar 31 17:24:30 2011 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/7d9ed704c9ceb4df05b49f73fac52ccf63d5f062 [^] Fixes issue 0016531: Cannot use null in a BaseOBObject parameter when calling a procedure It has been modified the code to detect nulls when assigning as a procedure parameter a BaseOBObject --- M src/org/openbravo/service/db/CallStoredProcedure.java --- |
|
(0035434) adrianromero (viewer) 2011-03-31 17:34 |
* Testing the issue Call an stored procedure passing a null value to a parameter of type BaseOBObject. For example the following code works: List<Object> parameters = new ArrayList<Object>(); List<Class<?>> types = new ArrayList<Class<?>>(); types.add(BigDecimal.class); parameters.add(new BigDecimal(120.0)); // Amount to covert: 120,00 € types.add(String.class); parameters.add("102"); // ID for EUR types.add(String.class); parameters.add("100"); // ID for USD types.add(Date.class); parameters.add(new Date()); // Conversion date types.add(String.class); parameters.add("S"); // ID for standard conversion type types.add(String.class); parameters.add("4028E6C72959682B01295A070852010D"); // ID for Sample Client types.add(String.class); parameters.add("0"); // ID for root organization "*" BigDecimal strPrice = (BigDecimal)CallStoredProcedure.getInstance().call( "C_CURRENCY_CONVERT", parameters, types); System.out.println(strPrice); But if you want to pass the Currency object as null should work too: types.add(org.openbravo.model.common.currency.Currency.Class); parameters.add(null); The procedure will not calculate properly the change because it will be missing the currency parameter but the error described in this issue report will not appear * Other areas affected No other areas affected. Only the CallStoredProcedure class has been modified in the case of null parameters. |
|
(0038284) jonalegriaesarte (viewer) 2011-06-13 10:57 |
Verified |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-03-29 13:13 | adrianromero | New Issue | |
| 2011-03-29 13:13 | adrianromero | Assigned To | => mtaal |
| 2011-03-29 13:13 | adrianromero | Modules | => Core |
| 2011-03-29 13:13 | adrianromero | OBNetwork customer | => Yes |
| 2011-03-29 13:18 | adrianromero | File Added: Fix-16531.diff | |
| 2011-03-29 15:22 | adrianromero | Issue Monitored: adrianromero | |
| 2011-03-29 15:22 | adrianromero | Issue End Monitor: adrianromero | |
| 2011-03-29 15:22 | adrianromero | Issue Monitored: networkb | |
| 2011-03-29 15:58 | maite | Note Added: 0035335 | |
| 2011-03-29 16:01 | adrianromero | Status | new => scheduled |
| 2011-03-29 16:01 | adrianromero | Steps to Reproduce Updated | View Revisions |
| 2011-03-29 16:02 | adrianromero | Issue cloned | 0016541 |
| 2011-03-29 16:02 | adrianromero | Relationship added | blocks 0016541 |
| 2011-03-31 17:13 | adrianromero | Assigned To | mtaal => adrianromero |
| 2011-03-31 17:26 | hgbot | Checkin | |
| 2011-03-31 17:26 | hgbot | Note Added: 0035433 | |
| 2011-03-31 17:26 | hgbot | Status | scheduled => resolved |
| 2011-03-31 17:26 | hgbot | Resolution | open => fixed |
| 2011-03-31 17:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/7d9ed704c9ceb4df05b49f73fac52ccf63d5f062 [^] |
| 2011-03-31 17:34 | adrianromero | Note Added: 0035434 | |
| 2011-06-03 10:58 | dalsasua | Assigned To | adrianromero => dalsasua |
| 2011-06-13 10:57 | jonalegriaesarte | Note Added: 0038284 | |
| 2011-06-13 10:57 | jonalegriaesarte | Status | resolved => closed |
| 2011-06-13 10:57 | jonalegriaesarte | Fixed in Version | => 3.0MP0 |
| Copyright © 2000 - 2009 MantisBT Group |