Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036862 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2017-09-15 08:58 | 2017-09-25 13:30 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 053c21c0408a | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | 9.6 | Ant version | |||||
Product Version | SCM revision | |||||||
Review Assigned To | AugustoMauch | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036862: update.database throws NPE in PostgreSQL 9.6 | |||||||
Description | Update.database fails if executed on an Openbravo instance that uses PostgreSQL 9.6. With the following error: [java] 20297 INFO - Updating database model... [java] org.apache.ddlutils.DdlUtilsException: java.lang.NullPointerException [java] at org.apache.ddlutils.util.CallbackClosure.execute(CallbackClosure.java:154) [java] at org.apache.ddlutils.platform.SqlBuilder$1.evaluate(SqlBuilder.java:975) [java] at org.apache.commons.collections.CollectionUtils.filter(CollectionUtils.java:406) [java] at org.apache.ddlutils.platform.SqlBuilder.applyForSelectedChanges(SqlBuilder.java:972) [java] at org.apache.ddlutils.platform.SqlBuilder.processChanges(SqlBuilder.java:1060) [java] at org.apache.ddlutils.platform.SqlBuilder.alterDatabase(SqlBuilder.java:576) [java] at org.apache.ddlutils.platform.SqlBuilder.alterDatabase(SqlBuilder.java:562) [java] at org.apache.ddlutils.platform.PlatformImplBase.alterTables(PlatformImplBase.java:679) [java] at org.apache.ddlutils.platform.PlatformImplBase.alterTables(PlatformImplBase.java:662) [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:178) [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86) [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:57) [java] Caused by: java.lang.NullPointerException [java] at org.apache.ddlutils.model.Parameter.getName(Parameter.java:53) [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder.writeParameter(PostgreSqlBuilder.java:506) [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder.writeDropFunctionStmt(PostgreSqlBuilder.java:346) [java] at org.apache.ddlutils.platform.SqlBuilder.dropFunction(SqlBuilder.java:4224) [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlBui20485 ERROR - [java] java.lang.NullPointerException The functions that are causing the error when trying to be dropped are: - GIN_TRGM_TRICONSISTENT - WORD_SIMILARITY - etc Those are functions defined by the new version of pg_trgm extension. The excludeFilter needs to be updated to exclude these new functions. | |||||||
Steps To Reproduce | In an Openbravo instance with PostgreSQL 9.6: - Run update.database. It will fail with a NullPointerException | |||||||
Proposed Solution | These are the functions defined by pg_trgm--1.1--1.2 [1] and by pg_trgm--1.3 [2]. Add exclusions for them in the exclude filter. [1] https://github.com/postgres/postgres/blob/master/contrib/pg_trgm/pg_trgm--1.1--1.2.sql [^] [2] https://github.com/postgres/postgres/blob/master/contrib/pg_trgm/pg_trgm--1.3.sql [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0099211) hgbot (developer) 2017-09-21 13:12 |
Repository: erp/devel/pi Changeset: 053c21c0408aaec30fec4becace76591c115e2cb Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Thu Sep 21 12:49:29 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/053c21c0408aaec30fec4becace76591c115e2cb [^] fixed bug 36862: update.database throws NPE in PG 6 It was casued because starting from PG 9.6 a new version of pg_trgm extension is used which includes new functions that shouldn't be tried to be processed by dbsm. Those functions are now excluded. --- M src-db/database/model/excludeFilter.xml --- |
(0099213) hgbot (developer) 2017-09-21 13:28 |
Repository: erp/devel/dbsm-main Changeset: 03d63d4136e617234506e5091d16229b13c46cdb Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Thu Sep 21 13:09:22 2017 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/03d63d4136e617234506e5091d16229b13c46cdb [^] related to bug 36862: sync exclude filter for trgm with pi --- M src-test/model/excludeFilter/excludePgTrgmFunctions.xml --- |
(0099450) hudsonbot (developer) 2017-09-22 03: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/79f756868bba [^] Maturity status: Test |
(0099544) AugustoMauch (administrator) 2017-09-25 13:30 |
Code reviewed and verified |
Issue History | |||
Date Modified | Username | Field | Change |
2017-09-15 08:58 | AugustoMauch | New Issue | |
2017-09-15 08:58 | AugustoMauch | Assigned To | => platform |
2017-09-15 08:58 | AugustoMauch | Modules | => Core |
2017-09-15 08:58 | AugustoMauch | Triggers an Emergency Pack | => No |
2017-09-15 09:09 | AugustoMauch | Description Updated | View Revisions |
2017-09-15 09:15 | AugustoMauch | Summary | Upgrade excludeFilter in order to support PostgreSQL 9.6 => Upgrade excludeFilter in order to support new versions of the pg_trgm extension |
2017-09-15 09:30 | caristu | Relationship added | related to 0034650 |
2017-09-21 12:42 | caristu | Relationship added | related to 0036911 |
2017-09-21 12:42 | alostale | Relationship added | blocks 0036914 |
2017-09-21 13:04 | alostale | Relationship deleted | related to 0036911 |
2017-09-21 13:06 | alostale | Review Assigned To | => AugustoMauch |
2017-09-21 13:06 | alostale | Type | feature request => defect |
2017-09-21 13:06 | alostale | Summary | Upgrade excludeFilter in order to support new versions of the pg_trgm extension => update.database throws NPE in PG 6 |
2017-09-21 13:06 | alostale | Assigned To | platform => alostale |
2017-09-21 13:12 | hgbot | Checkin | |
2017-09-21 13:12 | hgbot | Note Added: 0099211 | |
2017-09-21 13:12 | hgbot | Status | new => resolved |
2017-09-21 13:12 | hgbot | Resolution | open => fixed |
2017-09-21 13:12 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/053c21c0408aaec30fec4becace76591c115e2cb [^] |
2017-09-21 13:15 | alostale | Relationship added | has duplicate 0036043 |
2017-09-21 13:28 | hgbot | Checkin | |
2017-09-21 13:28 | hgbot | Note Added: 0099213 | |
2017-09-21 13:32 | shuehner | Summary | update.database throws NPE in PG 6 => update.database throws NPE in PostgreSQL 9.6 |
2017-09-22 03:19 | hudsonbot | Checkin | |
2017-09-22 03:19 | hudsonbot | Note Added: 0099450 | |
2017-09-25 13:30 | AugustoMauch | Note Added: 0099544 | |
2017-09-25 13:30 | AugustoMauch | Status | resolved => closed |
2017-09-25 13:30 | AugustoMauch | Fixed in Version | => 3.0PR17Q4 |
Copyright © 2000 - 2009 MantisBT Group |