From b5efecc28250e556730d7df3ef323896ac00f8e4 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 26 Jan 2024 14:45:59 +0100 Subject: [PATCH] IDEMPIERE-5567 Trl Export for table TestUU_Trl (#2207) - fix throwing TestUU_Trl org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying <= integer Hint: No operator matches the given name and argument types. You might need to add explicit type casts. Position: 268 - change the process to explicitly break when a DB exception happens --- .../src/org/compiere/install/Translation.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/install/Translation.java b/org.adempiere.base/src/org/compiere/install/Translation.java index 18bdca1ab4..a604e1f1e6 100644 --- a/org.adempiere.base/src/org/compiere/install/Translation.java +++ b/org.adempiere.base/src/org/compiere/install/Translation.java @@ -257,10 +257,12 @@ public class Translation implements IApplication sql.append (haveWhere ? " AND " : " WHERE ").append ("o.IsCentrallyMaintained='N'"); haveWhere = true; } - if (AD_Client_ID >= 0) + if (AD_Client_ID >= 0) { sql.append(haveWhere ? " AND " : " WHERE ").append("o.AD_Client_ID=").append(AD_Client_ID); + haveWhere = true; + } - if (onlyCentralized) + if (onlyCentralized && keyColumn.endsWith("_ID")) sql.append(haveWhere ? " AND " : " WHERE ").append(" o.").append(keyColumn).append("<=").append(MTable.MAX_OFFICIAL_ID).append(" AND o.IsActive = 'Y'"); sql.append(" ORDER BY t.").append(keyColumn); @@ -323,15 +325,9 @@ public class Translation implements IApplication // Close writer - teo_sarca [ 1705883 ] writer.close(); } - catch (SQLException e) - { - log.log(Level.SEVERE, sql.toString(), e); - return e.toString(); - } catch (Exception e) { - log.log(Level.SEVERE, "", e); - return e.toString(); + throw new AdempiereException(e.getLocalizedMessage(), e); } finally {