Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0045318 | Openbravo ERP | Y. DBSourceManager | public | 2020-10-28 15:11 | 2022-11-03 12:47 | |||||||
Reporter | shuehner | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0045318: NullPointerException during create.database with configScript doing model changes of non existing db objects | |||||||||||
Description | When 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 Reproduce | Add 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 Solution | Safeguard against 'check' being null in dbsm code and log4j.error with the required details + probably skip that specific change. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|