Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0032244 | Openbravo ERP | Y. DBSourceManager | public | 2016-02-16 07:42 | 2016-03-17 10:56 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | immediate | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR16Q2 | Fixed in Version | 3.0PR16Q2 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2015-04-28 |
Regression introduced in release | 3.0PR15Q3 |
Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0032244: oracle shows error in log when setting an AD column to not null |
Description | model change changing char(1) boolean from nullable to not null and looks like the incremental update.db processing that change has some issues:
[java] 40817 INFO - Disabling triggers
[java] 51348 WARN - SQL Command failed with: ORA-01451: column to be modified to NULL cannot be modified to NULL
[java]
[java] 51365 WARN - -- END
[java] ALTER TABLE OBPOS_PRINT_TEMPLATE MODIFY ISPDF CHAR(1) NULL
[java] 51740 INFO - Executed 837 SQL command(s) with 1 error(s)
https://ci.openbravo.com/job/ret-inc-oracle/3585/console [^]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ab2b38250f44 [^] |
Steps To Reproduce | There are different ways to reproduce, all of them in an Oracle instance.
1.1. Update an Oracle instance from a previous version to https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ab2b38250f44 [^]
-> Check in log WARN message
2.1 Emulate this situation in by executing in DB:
ALTER TABLE AD_WINDOW MODIFY (ISACTIVE NULL); --next update will reset not null contraint
update ad_module set status='I' where ad_module_id = 'A918E3331C404B889D69AA9BFAFB23AC'; --pick a module and set it as rebuild required
select ad_db_modified('Y') from dual; --forget local db changes
2.2 Login as System Admin
2.3 Open Module Management window and rebuild
-> ERROR: Build is marked as having warnings
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0032146 | | closed | mario_castello | Retail Modules | POS templates created in previous versions to RR14Q3, can not be printed | depends on | backport | 0032256 | 3.0PR16Q1 | closed | platform | Openbravo ERP | oracle shows error in log when setting an AD column to not null | depends on | backport | 0032257 | 3.0PR15Q4.4 | closed | platform | Openbravo ERP | oracle shows error in log when setting an AD column to not null | depends on | backport | 0032258 | 3.0PR15Q3.7 | closed | platform | Openbravo ERP | oracle shows error in log when setting an AD column to not null | caused by | feature request | 0029270 | | closed | alostale | Openbravo ERP | prevent table recreation in update.database |
|
Attached Files | rebuild-warn.png (51,820) 2016-02-17 12:29 https://issues.openbravo.com/file_download.php?file_id=9073&type=bug

|
|
Issue History |
Date Modified | Username | Field | Change |
2016-02-16 07:42 | alostale | New Issue | |
2016-02-16 07:42 | alostale | Assigned To | => platform |
2016-02-16 07:42 | alostale | OBNetwork customer | => No |
2016-02-16 07:42 | alostale | Modules | => Core |
2016-02-16 07:42 | alostale | Triggers an Emergency Pack | => No |
2016-02-16 07:42 | alostale | Priority | normal => urgent |
2016-02-16 07:43 | alostale | Target Version | => 3.0PR16Q2 |
2016-02-16 10:34 | hgbot | Checkin | |
2016-02-16 10:34 | hgbot | Note Added: 0084232 | |
2016-02-16 14:46 | alostale | Summary | oracle fails to set column to not null => oracle shows error in log when setting an AD column to not null |
2016-02-16 14:46 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=11147#r11147 |
2016-02-16 14:49 | alostale | Note Added: 0084254 | |
2016-02-16 14:52 | alostale | Regression level | => Production - Confirmed Stable |
2016-02-16 14:52 | alostale | Regression date | => 2015-04-28 |
2016-02-16 14:52 | alostale | Regression introduced in release | => 3.0PR15Q3 |
2016-02-16 14:52 | alostale | Regression introduced by commit | => http://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^] |
2016-02-16 14:52 | alostale | Relationship added | caused by 0029270 |
2016-02-16 14:53 | alostale | Priority | urgent => immediate |
2016-02-16 14:53 | alostale | Status | new => acknowledged |
2016-02-16 15:46 | alostale | Severity | major => minor |
2016-02-16 15:47 | alostale | Relationship added | related to 0032146 |
2016-02-17 12:12 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=11150#r11150 |
2016-02-17 12:29 | alostale | File Added: rebuild-warn.png | |
2016-02-17 12:29 | alostale | Review Assigned To | => AugustoMauch |
2016-02-17 12:30 | alostale | Status | acknowledged => scheduled |
2016-02-17 12:30 | alostale | Assigned To | platform => alostale |
2016-02-17 13:13 | hgbot | Checkin | |
2016-02-17 13:13 | hgbot | Note Added: 0084281 | |
2016-02-17 13:13 | hgbot | Checkin | |
2016-02-17 13:13 | hgbot | Note Added: 0084282 | |
2016-02-17 13:15 | hgbot | Checkin | |
2016-02-17 13:15 | hgbot | Note Added: 0084283 | |
2016-02-17 13:15 | hgbot | Status | scheduled => resolved |
2016-02-17 13:15 | hgbot | Resolution | open => fixed |
2016-02-17 13:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/983bdd5eab9bcd11e1ddc7d85ad7aa637e9afbd5 [^] |
2016-02-25 11:23 | hgbot | Checkin | |
2016-02-25 11:23 | hgbot | Note Added: 0084488 | |
2016-02-25 11:23 | hgbot | Checkin | |
2016-02-25 11:23 | hgbot | Note Added: 0084489 | |
2016-02-25 11:23 | hgbot | Checkin | |
2016-02-25 11:23 | hgbot | Note Added: 0084490 | |
2016-02-25 11:23 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/983bdd5eab9bcd11e1ddc7d85ad7aa637e9afbd5 [^] => http://code.openbravo.com/erp/devel/pi/rev/689c4b6505eaac93cfe275dc9ae23ca9e3f3be71 [^] |
2016-02-25 11:23 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/983bdd5eab9bcd11e1ddc7d85ad7aa637e9afbd5 [^] => http://code.openbravo.com/erp/devel/pi/rev/689c4b6505eaac93cfe275dc9ae23ca9e3f3be71 [^] |
2016-02-25 11:24 | hgbot | Checkin | |
2016-02-25 11:24 | hgbot | Note Added: 0084491 | |
2016-02-25 11:27 | alostale | Note Edited: 0084490 | bug_revision_view_page.php?bugnote_id=0084490#r11239 |
2016-02-25 18:51 | AugustoMauch | Note Added: 0084526 | |
2016-02-25 18:51 | AugustoMauch | Status | resolved => closed |
2016-02-25 18:51 | AugustoMauch | Fixed in Version | => 3.0PR16Q2 |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085146 | |
2016-03-17 10:56 | hudsonbot | Checkin | |
2016-03-17 10:56 | hudsonbot | Note Added: 0085168 | |
Notes |
|
(0084232)
|
hgbot
|
2016-02-16 10:34
|
|
Repository: erp/devel/dbsm-main
Changeset: 3ca79561ccebcc817f83f918921eec319093f785
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 16 10:34:15 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3ca79561ccebcc817f83f918921eec319093f785 [^]
related to bug 32244: test cases should fail in case of warn/error is logged
---
M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java
A src-test/src/org/openbravo/dbsm/test/base/TestLogAppender.java
---
|
|
|
|
This is caused because it is being tried to disable not-null constraint from a column which is already nullable. In Oracle this statement causes an error whereas in PostgreSQL is just ignored.
Existing test suite didn't caught this error because, although there are test cases executing this case, the assertions ensure the model is correct but logs were not checked to prevent error/warning messages.
Test cases have been changed to fail in case any error/warning is logged during the process. |
|
|
(0084281)
|
hgbot
|
2016-02-17 13:13
|
|
Repository: erp/devel/dbsm-main
Changeset: 897107b8de128f06c2237476cdd64c92fad3c846
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 16 14:55:08 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/897107b8de128f06c2237476cdd64c92fad3c846 [^]
related to bug 32244: ORA error in log when setting an AD column to not null
Prevented trying to disable not-null constraints in case the column was already
nullable.
---
M src/org/apache/ddlutils/Platform.java
M src/org/apache/ddlutils/platform/PlatformImplBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
---
|
|
|
(0084282)
|
hgbot
|
2016-02-17 13:13
|
|
|
|
(0084283)
|
hgbot
|
2016-02-17 13:15
|
|
Repository: erp/devel/pi
Changeset: 983bdd5eab9bcd11e1ddc7d85ad7aa637e9afbd5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Feb 17 13:14:36 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/983bdd5eab9bcd11e1ddc7d85ad7aa637e9afbd5 [^]
fixed bug 32244: ORA error in log when setting an AD column to not null
Prevented trying to disable not-null constraints in case the column was already
set as nullable in DB.
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0084488)
|
hgbot
|
2016-02-25 11:23
|
|
Repository: erp/devel/dbsm-main
Changeset: 827164944af4f27b05da160d41eb6dd9a4978d3a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Feb 25 09:26:26 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/827164944af4f27b05da160d41eb6dd9a4978d3a [^]
related to issue 32244: added additional test cases
Changes for column mandatory <--> no mandatory are now covered for both AD
and instance tables.
---
M src-test/src/org/openbravo/dbsm/test/model/data/OtherDefaults.java
---
|
|
|
(0084489)
|
hgbot
|
2016-02-25 11:23
|
|
Repository: erp/devel/pi
Changeset: 689c4b6505eaac93cfe275dc9ae23ca9e3f3be71
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Feb 25 11:22:36 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/689c4b6505eaac93cfe275dc9ae23ca9e3f3be71 [^]
fixed bug 32244: ORA shows error in log when setting an AD column to not null
Implemented a better condition to decide whether not nulls should be disabled,
now it is based on the flag set for deferred not nulls, covering in this manner
some cases that were not workding before and making the code clearer to understand
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|
|
(0084490)
|
hgbot
|
2016-02-25 11:23
(edited on: 2016-02-25 11:27) |
|
Repository: erp/devel/dbsm-main
Changeset: 1314eec95492
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Feb 25 11:22:36 2016 +0100
URL: https://code.openbravo.com/erp/devel/dbsm-main/rev/1314eec95492 [^]
fixed bug 32244: ORA shows error in log when setting an AD column to not null
Implemented a better condition to decide whether not nulls should be disabled,
now it is based on the flag set for deferred not nulls, covering in this manner
some cases that were not workding before and making the code clearer to understand
|
|
|
(0084491)
|
hgbot
|
2016-02-25 11:24
|
|
|
|
|
Code reviewed and verified in pi@689c4b6505ea |
|
|
|
|
|
|
|