Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0056837Openbravo ERPA. Platformpublic2024-10-19 09:522024-10-19 12:39
AugustoMauch 
AugustoMauch 
urgentmajoralways
closedfixed 
5
 
PR25Q1 
Core
No
0056837: compilation error: [java] org.postgresql.util.PSQLException: Bad value for type int : 2173831272
Executing update.database command, error is happening when the postgresql OID assigned to functions is higher than max int value (2,147,483,647).

java.lang.NumberFormatException: For input string: "2177813260"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:652)
    at java.base/java.lang.Integer.parseInt(Integer.java:770)
    at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.getOperatorClassName(PostgreSqlModelLoader.java:955)
    at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.readIndex(PostgreSqlModelLoader.java:932)
    at org.apache.ddlutils.platform.ModelLoaderBase$7.getRow(ModelLoaderBase.java:354)
    at org.apache.ddlutils.platform.ModelLoaderBase.readList(ModelLoaderBase.java:665)
    at org.apache.ddlutils.platform.ModelLoaderBase.readIndexes(ModelLoaderBase.java:351)
    at org.apache.ddlutils.platform.ModelLoaderBase.readTable(ModelLoaderBase.java:264)
    at org.apache.ddlutils.platform.ModelLoaderBase$1.getRow(ModelLoaderBase.java:207)
    at org.apache.ddlutils.platform.ModelLoaderBase.readList(ModelLoaderBase.java:665)
    at org.apache.ddlutils.platform.ModelLoaderBase.readTables(ModelLoaderBase.java:203)
    at org.apache.ddlutils.platform.ModelLoaderBase.readDatabase(ModelLoaderBase.java:162)
See it being reproduced in ci: https://builds.openbravo.com/job/try-pos2-checks-modules-pgsql/7200/testReport/ [^]
No tags attached.
related to defect 0054768 closed AugustoMauch compilation error: [java] org.postgresql.util.PSQLException: Bad value for type int : 2173831272 
depends on backport 0056838PR24Q4 closed AugustoMauch compilation error: [java] org.postgresql.util.PSQLException: Bad value for type int : 2173831272 
depends on backport 0056839PR24Q3.2 closed AugustoMauch compilation error: [java] org.postgresql.util.PSQLException: Bad value for type int : 2173831272 
depends on backport 0056840PR24Q2.4 closed AugustoMauch compilation error: [java] org.postgresql.util.PSQLException: Bad value for type int : 2173831272 
related to defect 0056846 acknowledged AugustoMauch Review other oid-as-int problems 
Issue History
2024-10-19 09:52AugustoMauchNew Issue
2024-10-19 09:52AugustoMauchAssigned To => AugustoMauch
2024-10-19 09:52AugustoMauchModules => Core
2024-10-19 09:52AugustoMauchTriggers an Emergency Pack => No
2024-10-19 09:52AugustoMauchIssue generated from0054768
2024-10-19 09:53AugustoMauchRelationship addedrelated to 0054768
2024-10-19 09:56hgbotNote Added: 0170599
2024-10-19 09:56hgbotNote Added: 0170600
2024-10-19 09:57AugustoMauchStatusnew => scheduled
2024-10-19 12:39hgbotResolutionopen => fixed
2024-10-19 12:39hgbotStatusscheduled => closed
2024-10-19 12:39hgbotNote Added: 0170601
2024-10-19 12:39hgbotFixed in Version => PR25Q1
2024-10-19 12:39hgbotNote Added: 0170602
2024-10-19 12:39hgbotNote Added: 0170603
2024-10-19 12:39hgbotNote Added: 0170604
2024-10-21 12:42AugustoMauchRelationship addedrelated to 0056846

Notes
(0170599)
hgbot   
2024-10-19 09:56   
Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/50 [^]
(0170600)
hgbot   
2024-10-19 09:56   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1398 [^]
(0170601)
hgbot   
2024-10-19 12:39   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1398 [^]
(0170602)
hgbot   
2024-10-19 12:39   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 34649c9d81bbef4edcaa64f21e81d17566a40f8f
Author: Augusto Mauch <a.mauch@orisha.com>
Date: 19-10-2024 11:00:26
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/34649c9d81bbef4edcaa64f21e81d17566a40f8f [^]

Fixes ISSUE-56837: error reading operator oid if oid excedes max int value

When oid excedes the maximum value for int in Java, an error is thrown reading
functions from pg catalog.

Changed to read them as long instead of integer.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0170603)
hgbot   
2024-10-19 12:39   
Merge request merged: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/50 [^]
(0170604)
hgbot   
2024-10-19 12:39   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: 39dfa51ead26207368b5a6212cfac52d93327770
Author: Augusto Mauch <a.mauch@orisha.com>
Date: 19-10-2024 11:00:01
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/39dfa51ead26207368b5a6212cfac52d93327770 [^]

Fixes ISSUE-56837: error reading operator oid if oid excedes max int value

When oid excedes the maximum value for int in Java, an error is thrown reading
functions from pg catalog.

Changed to read them as long instead of integer.

---
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
---