Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025130Openbravo ERPA. Platformpublic2013-11-12 02:212013-11-19 19:07
dbaz 
dbaz 
normalminoralways
closedfixed 
5
 
3.0MP30 
shankarb
Core
No
0025130: Java error if no record indentifier is defined in the parent record
Java error if no record indentifier is defined in the parent record:

If you define a parent/child window structure, and you don't define a record indentifier in the parent, you get an ugly java error in the backend that doesn't let you know at all where the error could be.
Create two new tables (father and child).
Set both tables in "Tables and Columns" and in "Windows Tabs and Fields". It is important that you don't set any field as "Record Identifier" (in the 'Column' tab)
Create a new entry in "Menu" window to be able to navigate to the created window
Do "ant smartbuild"

Go to the created window.
Create a father/header
Create a child/line

Notice that it seems like the child/line form doesn't finish to load. There is a Java error in the backend like:

ERROR org.openbravo.erpCommon.utility.ComboTableData - Error of SQL in query: SELECT td0.Obuiapp_Grid_Configuration_ID AS ID, , '' AS DESCRIPTION
FROM Obuiapp_Grid_Configuration td0
WHERE td0.AD_Client_ID IN ('0','0')
AND td0.AD_Org_ID IN ('0')
AND (td0.isActive = 'Y' OR td0.Obuiapp_Grid_Configuration_ID = (?) )
ORDER BY 2Exception:org.postgresql.util.PSQLException: ERROR: error de sintaxis en o cerca de «,»
  Position: 49
b3e0edee 97748 [http-8880-4] ERROR org.openbravo.base.exception.OBException - Error while computing combo data
java.lang.Exception: @CODE=0@ERROR: error de sintaxis en o cerca de «,»
  Position: 49
    at org.openbravo.erpCommon.utility.ComboTableData.select(ComboTableData.java:1102)
    at org.openbravo.client.kernel.reference.UIDefinition.getValueInComboReference(UIDefinition.java:473)
    at org.openbravo.client.kernel.reference.FKComboUIDefinition.getFieldProperties(FKComboUIDefinition.java:101)
...
Avoid this Java error and show in the client something that points the user/developer that something has failed.
No tags attached.
Issue History
2013-11-12 02:21dbazNew Issue
2013-11-12 02:21dbazAssigned To => dbaz
2013-11-12 02:21dbazModules => Core
2013-11-12 02:21dbazTriggers an Emergency Pack => No
2013-11-12 02:36dbazReview Assigned To => shankarb
2013-11-12 02:36dbazIssue Monitored: shankarb
2013-11-12 02:37dbazNote Added: 0062075
2013-11-12 02:41hgbotCheckin
2013-11-12 02:41hgbotNote Added: 0062076
2013-11-12 02:41hgbotStatusnew => resolved
2013-11-12 02:41hgbotResolutionopen => fixed
2013-11-12 02:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dc863e6e11e31739d4e4fbbb831d91418fe48d64 [^]
2013-11-12 11:32shankarbNote Added: 0062085
2013-11-12 11:32shankarbStatusresolved => closed
2013-11-12 11:32shankarbFixed in Version => 3.0MP30
2013-11-19 19:07hudsonbotCheckin
2013-11-19 19:07hudsonbotNote Added: 0062251

Notes
(0062075)
dbaz   
2013-11-12 02:37   
With the solution, the java console will show an error like:
"Foreign table referenced by 'whatever' does not have 'Record Identifier' defined"
and also, the UI will not be blocked: the combo will be filled with ">>No Record Identifier<<" lines
(0062076)
hgbot   
2013-11-12 02:41   
Repository: erp/devel/pi
Changeset: dc863e6e11e31739d4e4fbbb831d91418fe48d64
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Tue Nov 12 02:41:00 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dc863e6e11e31739d4e4fbbb831d91418fe48d64 [^]

Fixed issue 25130: Proper message if there is no 'Record Identifier' defined
in the parent window of any window.
Before this fix, an exception was thrown in the console, and the UI rendered an incomplete
form impossible to be filled

---
M src/org/openbravo/erpCommon/utility/ComboTableData.java
---
(0062085)
shankarb   
2013-11-12 11:32   
Code reviewed and verified in pi changeset e3a8f5f3ca3b.
(0062251)
hudsonbot   
2013-11-19 19:07   
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/ab71e0273dc1 [^]

Maturity status: Test