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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032244
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2016-02-16 07:422016-03-17 10:56
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR16Q2
StatusclosedFix in branchFixed in SCM revision689c4b6505ea
ProjectionnoneETAnoneTarget Version3.0PR16Q2
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2015-04-28
Regression introduced in release3.0PR15Q3
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^]
Triggers an Emergency PackNo
Summary

0032244: oracle shows error in log when setting an AD column to not null

Descriptionmodel 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 ReproduceThere 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

TagsNo tags attached.
Attached Filespng file icon rebuild-warn.png [^] (51,820 bytes) 2016-02-17 12:29

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032146 closedmario_castello Retail Modules POS templates created in previous versions to RR14Q3, can not be printed 
depends on backport 00322563.0PR16Q1 closedplatform Openbravo ERP oracle shows error in log when setting an AD column to not null 
depends on backport 00322573.0PR15Q4.4 closedplatform Openbravo ERP oracle shows error in log when setting an AD column to not null 
depends on backport 00322583.0PR15Q3.7 closedplatform Openbravo ERP oracle shows error in log when setting an AD column to not null 
caused by feature request 0029270 closedalostale Openbravo ERP prevent table recreation in update.database 

-  Notes
(0084232)
hgbot (developer)
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
---
(0084254)
alostale (manager)
2016-02-16 14:49

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 (developer)
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 (developer)
2016-02-17 13:13

Repository: erp/devel/dbsm-main
Changeset: 38fce583f758b9d32f161538ab0e8f0c2286c408
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Feb 17 13:12:39 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/38fce583f758b9d32f161538ab0e8f0c2286c408 [^]

related to bug 32244: javadoc for API

---
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
(0084283)
hgbot (developer)
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 (developer)
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 (developer)
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 (developer)
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 (developer)
2016-02-25 11:24

Repository: erp/devel/dbsm-main
Changeset: 65084896d0b02627d31e27241b920f577b02a57b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Feb 25 09:49:23 2016 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/65084896d0b02627d31e27241b920f577b02a57b [^]

related to bug 32244: javadoc

---
M src/org/apache/ddlutils/model/Database.java
---
(0084526)
AugustoMauch (administrator)
2016-02-25 18:51

Code reviewed and verified in pi@689c4b6505ea
(0085146)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test
(0085168)
hudsonbot (developer)
2016-03-17 10:56

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/b22fb0500156 [^]
Maturity status: Test

- 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 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 View Revisions
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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker