Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014623Openbravo ERPY. DBSourceManagerpublic2010-09-20 17:362010-10-09 00:00
marvintm 
marvintm 
normalmajorhave not tried
closedfixed 
5
 
 
Core
No
0014623: export.config.script can fail with NullPointerException in the ColumnDataChange.equals() method
Export.config.script task can fail with the following exception:

[exportconfigscript] 292870 INFO  - Module added to comparison: 9301BAB94FAE486B8194B09CEC348F1D
[exportconfigscript] 308848 INFO  - Loading script of formal changes
[exportconfigscript] java.lang.NullPointerException
[exportconfigscript] at org.apache.ddlutils.alteration.ColumnDataChange.equals(ColumnDataChange.java:115)
[exportconfigscript] at org.openbravo.ddlutils.task.ExportConfigScript.doExecute(ExportConfigScript.java:219)
[exportconfigscript] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:87)
[exportconfigscript] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[exportconfigscript] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[exportconfigscript] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exportconfigscript] at java.lang.reflect.Method.invoke(Method.java:597)
[exportconfigscript] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[exportconfigscript] at org.apache.tools.ant.Task.perform(Task.java:348)
[exportconfigscript] at org.apache.tools.ant.Target.execute(Target.java:357)
[exportconfigscript] at org.apache.tools.ant.Target.performTasks(Target.java:385)

This can happen if there is a change in the formalChangesScript.xml file which has a null value in the "newValue" attribute.

The reason for this error is that there is a bug in the .equals() method, which doesn't take into account that the new value of a change can be null.
-Set a sourcedata column value to null
-Install a module (which doesn't modify that value)
-Execute export.config.script with a template on development
The equals() method of the ColumnDataChange class needs to be fixed.
No tags attached.
related to defect 00140912.50MP21 closed marvintm When installing a module and having a template that removes check constraints the process fails 
Issue History
2010-09-20 17:36marvintmNew Issue
2010-09-20 17:36marvintmAssigned To => marvintm
2010-09-20 17:39hgbotCheckin
2010-09-20 17:39hgbotNote Added: 0031241
2010-09-20 17:39hgbotStatusnew => resolved
2010-09-20 17:39hgbotResolutionopen => fixed
2010-09-20 17:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/a711c2977e05bc216823d162c6aff53534ac618b [^]
2010-09-20 17:43hgbotCheckin
2010-09-20 17:43hgbotNote Added: 0031242
2010-09-20 17:43hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/a711c2977e05bc216823d162c6aff53534ac618b [^] => http://code.openbravo.com/erp/devel/pi/rev/cb48a6557b673574111244a99672c20408bcfd45 [^]
2010-09-20 22:08hudsonbotCheckin
2010-09-20 22:08hudsonbotNote Added: 0031246
2010-10-07 10:57rafarodaRelationship addedrelated to 0014091
2010-10-08 15:18shuehnerNote Added: 0031691
2010-10-08 15:18shuehnerStatusresolved => closed
2010-10-09 00:00anonymoussf_bug_id0 => 3084018

Notes
(0031241)
hgbot   
2010-09-20 17:39   
Repository: erp/devel/dbsm-main
Changeset: a711c2977e05bc216823d162c6aff53534ac618b
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Sep 20 17:37:50 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/a711c2977e05bc216823d162c6aff53534ac618b [^]

Fixed issue 14623. ColumnDataChange.equals() method will now take into accont that newValue can be null.

---
M src/org/apache/ddlutils/alteration/ColumnDataChange.java
---
(0031242)
hgbot   
2010-09-20 17:43   
Repository: erp/devel/pi
Changeset: cb48a6557b673574111244a99672c20408bcfd45
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Sep 20 17:38:36 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cb48a6557b673574111244a99672c20408bcfd45 [^]

Fixed issue 14623. ColumnDataChange.equals() method will now take into accont that newValue can be null.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0031246)
hudsonbot   
2010-09-20 22:08   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/cb48a6557b67 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/d7c675d41460 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18426.obx [^]
(0031691)
shuehner   
2010-10-08 15:18   
Tested in pi/pgsql. Working fine now, no exception. Changeset reviewed looks fine, as its just add an existing null-safety part for newValue which was already present for oldValue.