Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035258Openbravo ERPY. DBSourceManagerpublic2017-02-14 13:082017-03-15 20:19
caristu 
caristu 
highminoralways
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
Production - Confirmed Stable
2016-01-20
3.0PR16Q2
http://code.openbravo.com/erp/devel/pi/rev/9cbd94b17c8829193f42387b92d1d098b018637f [^]
No
0035258: NullPointerException thrown when updating database having a wrong declaration in exclude filters
A NullPointerException is thrown when updating the database having an exclude filter file with a line which does not define the name of the excluded object. For example:

<excludedTable name=""/>

Although this is NOT a valid configuration and the exclude filter file should not contain this kind of lines, DBSM should ignore such line instead of throwing a NPE.

The NPE exception raised:

 [java] java.lang.NullPointerException
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.closeMetadataSentences(ModelLoaderBase.java:169)
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.closeMetadataSentences(PostgreSqlModelLoader.java:441)
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.getDatabase(ModelLoaderBase.java:134)
     [java] at org.apache.ddlutils.platform.PlatformImplBase.loadModelFromDatabase(PlatformImplBase.java:2335)
     [java] at org.apache.ddlutils.platform.PlatformImplBase.loadModelFromDatabase(PlatformImplBase.java:2326)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:131)
     [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:57)
....
1) Apply the attached path which adds this line <excludedTable name=""/> into the core exclude filter file

2) Run ant update.database
No tags attached.
caused by feature request 0031685 closed AugustoMauch Allow using SQL wildcards in the dbsourmanager exclude filter 
diff wrongExcludedObject.diff (399) 2017-02-14 13:38
https://issues.openbravo.com/file_download.php?file_id=10443&type=bug
Issue History
2017-02-14 13:08caristuNew Issue
2017-02-14 13:08caristuAssigned To => platform
2017-02-14 13:08caristuModules => Core
2017-02-14 13:08caristuTriggers an Emergency Pack => No
2017-02-14 13:08caristuAssigned Toplatform => caristu
2017-02-14 13:08caristuRelationship addedcaused by 0031685
2017-02-14 13:12caristuDescription Updatedbug_revision_view_page.php?rev_id=14582#r14582
2017-02-14 13:38hgbotCheckin
2017-02-14 13:38hgbotNote Added: 0094312
2017-02-14 13:38hgbotStatusnew => resolved
2017-02-14 13:38hgbotResolutionopen => fixed
2017-02-14 13:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/82274fe3c23e7c337940c9151f055916c7630e3d [^]
2017-02-14 13:38caristuFile Added: wrongExcludedObject.diff
2017-02-14 13:46hgbotCheckin
2017-02-14 13:46hgbotNote Added: 0094313
2017-02-14 13:46caristuReview Assigned To => alostale
2017-02-15 09:42caristuDescription Updatedbug_revision_view_page.php?rev_id=14594#r14594
2017-02-17 07:28alostaleNote Added: 0094427
2017-02-17 07:28alostaleStatusresolved => closed
2017-02-17 07:28alostaleFixed in Version => 3.0PR17Q2
2017-02-17 07:31alostaleRegression level => Production - QA Approved
2017-02-17 07:31alostaleRegression date => 2016-01-20
2017-02-17 07:31alostaleRegression introduced in release => 3.0PR16Q2
2017-02-17 07:31alostaleRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/9cbd94b17c8829193f42387b92d1d098b018637f [^]
2017-02-17 07:32alostaleRegression levelProduction - QA Approved => Production - Confirmed Stable
2017-02-17 07:33alostaleNote Added: 0094428
2017-03-15 20:19hudsonbotCheckin
2017-03-15 20:19hudsonbotNote Added: 0095182

Notes
(0094312)
hgbot   
2017-02-14 13:38   
Repository: erp/devel/dbsm-main
Changeset: 82274fe3c23e7c337940c9151f055916c7630e3d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Feb 14 13:30:56 2017 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/82274fe3c23e7c337940c9151f055916c7630e3d [^]

fixes bug 35258: NPE on update.database having wrong exclusion in excludeFilter

A NPE was thrown in update.database task, having an exclusion in the excludeFilter file which was leaving the object name empty. The exception was being thrown when looking for elements using wildcard expressions. This exception is now avoided.

---
M src/org/apache/ddlutils/platform/ExcludeFilter.java
---
(0094313)
hgbot   
2017-02-14 13:46   
Repository: erp/devel/pi
Changeset: ffd201fa609efe7e1cfd60e44cb2699c7f9f8fa3
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Feb 14 13:43:51 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ffd201fa609efe7e1cfd60e44cb2699c7f9f8fa3 [^]

related to bug 35258: updated dbsourcemanager library

---
M src-db/database/lib/dbsourcemanager.jar
---
(0094427)
alostale   
2017-02-17 07:28   
reviewed
(0094428)
alostale   
2017-02-17 07:33   
Not backporting because the issue is minor, and should not have a big impact as it to fail requires of already incorrectly defined filters.
(0095182)
hudsonbot   
2017-03-15 20:19   
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/54e102bef53e [^]
Maturity status: Test