Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045318
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2020-10-28 15:112024-12-20 09:29
ReportershuehnerView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045318: NullPointerException during create.database with configScript doing model changes of non existing db objects

DescriptionWhen a configScript is trying to be applied i.e. during install.source and it contains a removeCheckChange but the named-check being referenced is missing a NullPointerException is triggered.

While the configScript is broken a proper error message should be shown referencing the missing element.

Example error message:
[createdatabase] 89043 [main] INFO org.openbravo.ddlutils.task.CreateDatabase - Loading config script for module from path /srv/ci/workspace/mod-simple-ci34.18102/modules/org.openbravo.module.sii.template/src-db/database/configScript.xml
[createdatabase] 89045 [main] ERROR org.apache.ddlutils.platform.PlatformImplBase - Error applying Configuration Script model changes
[createdatabase] java.lang.NullPointerException: null
[createdatabase] at org.apache.ddlutils.platform.oracle.OracleBuilder.printRemoveCheckChange(OracleBuilder.java:612) ~[dbsourcemanager.jar:?]
[createdatabase] at org.apache.ddlutils.platform.PlatformImplBase.applyConfigScriptModelChanges(PlatformImplBase.java:3108) [dbsourcemanager.jar:?]
[createdatabase] at org.apache.ddlutils.platform.PlatformImplBase.applyConfigScript(PlatformImplBase.java:3090) [dbsourcemanager.jar:?]
[createdatabase] at org.openbravo.ddlutils.task.CreateDatabase.insertSourceData(CreateDatabase.java:260) [dbsourcemanager.jar:?]

Triggered this entry from the above configScript but that specific check not present:
    <removeCheckChange tableName="AD_ORGINFO" checkName="EM_AEAT390_REPR_FIS_CH">
      <check name="EM_AEAT390_REPR_FIS_CH"><![CDATA[((EM_AEAT390_REP_NIF IS NULL) AND (EM_AEAT390_REP_NAME IS NULL)) OR ((EM_AEAT390_REP_NIF IS NOT NULL) AND (EM_AEAT390_REP_NAME IS NOT NULL))]]></check>
    </removeCheckChange>
Steps To ReproduceAdd above removeCheckChange to i.e. any configScript should be enough to trigger the error.
That should much easier then to reproduce the exact situation with CodeSnapshot and multiple modules in which is was found.
Proposed SolutionSafeguard against 'check' being null in dbsm code and log4j.error with the required details + probably skip that specific change.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0044892 closedalostale On install.source config scripts are applied in two steps 

-  Notes
(0124007)
hgbot (developer)
2020-10-29 13:51

Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/19 [^]
(0142880)
caristu (developer)
2022-11-03 12:47

The fix for 0044892 makes the NullPointerException go away, but instead of performing this operation silently it would be nice to show a warning with the changes that are not going to be eventually applied.
(0173542)
hgbot (developer)
2024-12-20 09:29

Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/54 [^]
(0173543)
hgbot (developer)
2024-12-20 09:29

Merge request closed: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/19 [^]

- Issue History
Date Modified Username Field Change
2020-10-28 15:11 shuehner New Issue
2020-10-28 15:11 shuehner Assigned To => platform
2020-10-28 15:11 shuehner Modules => Core
2020-10-28 15:11 shuehner Triggers an Emergency Pack => No
2020-10-29 13:48 alostale Relationship added related to 0044892
2020-10-29 13:49 alostale Summary NullPointerException during create.database with configScript doing removeCheckChange of non existing check => NullPointerException during create.database with configScript doing model changes of non existing db objects
2020-10-29 13:49 alostale Assigned To platform => alostale
2020-10-29 13:51 hgbot Note Added: 0124007
2022-02-01 07:24 alostale Assigned To alostale => Triage Platform Base
2022-11-03 12:47 caristu Note Added: 0142880
2024-12-20 09:29 hgbot Note Added: 0173542
2024-12-20 09:29 hgbot Note Added: 0173543


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker