Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016543Openbravo ERPA. Platformpublic2011-03-29 16:432011-05-12 13:30
AinhoaPagola 
mtaal 
normalminorhave not tried
closedfixed 
20Ubuntu 8.4
3.0RC5 
3.0MP0 
Core
No
0016543: Window created with error on module
After creating a new window, with a new table in a new module. It is not properly build as an error is displayed when accessing it.
1.-Create the table attached in the issue in the database.
2.-Create a new module. Java data package: org.openbravo.hotel. Check it as in development. Create a dependency to core. Create a Data package: org.openbravo.hotel.data.
3.-Create the table in the application dictionary. Name = hotel_guest, DB Table name = hotel_guest and JavaClass: hotelguest. Data access = Client/Organization. Create the columns.
4.-Run Synchronize Terminology
5.-Create the window, the tab and the fields for the table.
6.-Create the menu
7.-Compile the window
8.-Restart tomcat
9.-Login the application and try and access the window. The error attached is shown the first time it is accessed. The second time, it is not possible to insert data on it. Reloading the page, the error is displayed.
No tags attached.
? Hotel_guest (1,055) 2011-03-29 16:43
https://issues.openbravo.com/file_download.php?file_id=3781&type=bug
png Error.png (63,529) 2011-03-29 16:43
https://issues.openbravo.com/file_download.php?file_id=3782&type=bug
png
Issue History
2011-03-29 16:43AinhoaPagolaNew Issue
2011-03-29 16:43AinhoaPagolaAssigned To => alostale
2011-03-29 16:43AinhoaPagolaFile Added: Hotel_guest
2011-03-29 16:43AinhoaPagolaModules => Core
2011-03-29 16:43AinhoaPagolaFile Added: Error.png
2011-03-30 08:52alostaleTarget Version => 3.0RC6
2011-03-30 08:52alostaleStatusnew => scheduled
2011-03-30 08:52alostalefix_in_branch => pi
2011-03-31 09:02alostaleNote Added: 0035387
2011-03-31 09:03alostaleNote Added: 0035388
2011-03-31 09:03alostaleAssigned Toalostale => mtaal
2011-03-31 09:03alostalePriorityurgent => normal
2011-03-31 09:03alostaleTarget Version3.0RC6 => 3.0
2011-03-31 09:03alostalefix_in_branchpi =>
2011-04-26 16:09dalsasuaIssue Monitored: networkb
2011-05-02 12:00AinhoaPagolaSeveritymajor => minor
2011-05-06 15:16hgbotCheckin
2011-05-06 15:16hgbotNote Added: 0036518
2011-05-06 15:16hgbotStatusscheduled => resolved
2011-05-06 15:16hgbotResolutionopen => fixed
2011-05-06 15:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/36fe7542df646c1cc04fcf3978c17919793bb69d [^]
2011-05-11 17:24AinhoaPagolaNote Added: 0036692
2011-05-11 17:24AinhoaPagolaStatusresolved => closed
2011-05-12 13:30hudsonbotCheckin
2011-05-12 13:30hudsonbotNote Added: 0036847

Notes
(0035387)
alostale   
2011-03-31 09:02   
The problem is caused because the table has not identifier.

When compiling this message is got:

[WADValidation] 53 [main] ERROR org.openbravo.wad.validation.WADValidationResult - +++++++++++++++++++++++++++++++++++++++++++++++++++
[WADValidation] 58 [main] ERROR org.openbravo.wad.validation.WADValidationResult - Errors for Validation type: Missing Identifier
[WADValidation] 65 [main] ERROR org.openbravo.wad.validation.WADValidationResult - +++++++++++++++++++++++++++++++++++++++++++++++++++
[WADValidation] 67 [main] ERROR org.openbravo.wad.validation.WADValidationResult - Table Hotel_guest has not identifier.

This is the error obtained when trying to fetch data:
581283 [http-8881-4] ERROR org.hibernate.hql.PARSER - line 1:393: unexpected token: null
581292 [http-8881-4] ERROR org.openbravo.base.exception.OBException - Exception when creating query select e from Hotel_guest as e where e.organization.id in ('0', '4F68EB1C1B734E79B27DE9D2DF56089F', '0D8E225ADA6E425E98EAA0F34E5912D7', 'B9C7088AB859483A9B1FB342AC2BE17A', '90A1F59849E84AFABD04814B3D15A691', '378AF0EAE1A2479EAAA33436645E9433', '3C816D72B14D4BBCB8571404B794AB84', '7A8E888A4B4C4E638CD5EB3A41A3289A') and e.client.id in ('FF8080812AFBCB14012AFBD3E373001F', '0')order by
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: null near line 1, column 393 [select e from Hotel_guest as e where e.organization.id in ('0', '4F68EB1C1B734E79B27DE9D2DF56089F', '0D8E225ADA6E425E98EAA0F34E5912D7', 'B9C7088AB859483A9B1FB342AC2BE17A', '90A1F59849E84AFABD04814B3D15A691', '378AF0EAE1A2479EAAA33436645E9433', '3C816D72B14D4BBCB8571404B794AB84', '7A8E888A4B4C4E638CD5EB3A41A3289A') and e.client.id in ('FF8080812AFBCB14012AFBD3E373001F', '0')order by ]

Problem is in DefaultDataSource, it receives 'identifier' as sort parameter but it is not present in table definition.

Martin: should we do some checks (the ones done in WAD validations??) before trying to build a window?
(0035388)
alostale   
2011-03-31 09:03   
Lowered priority: the problem was in the table definition.

TBD: which kind of validations should be done to show a more user friendly message.
(0036518)
hgbot   
2011-05-06 15:16   
Repository: erp/devel/pi
Changeset: 36fe7542df646c1cc04fcf3978c17919793bb69d
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri May 06 15:16:32 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/36fe7542df646c1cc04fcf3978c17919793bb69d [^]

Fixes issue 16543: Window created with error on module

---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
---
(0036692)
AinhoaPagola   
2011-05-11 17:24   
Tested and working fine.
(0036847)
hudsonbot   
2011-05-12 13:30   
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/c40e579fcd38 [^]

Maturity status: Test