Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015983Openbravo ERP01. General setuppublic2011-02-15 11:482011-03-16 19:08
jonalegriaesarte 
adrianromero 
highminoralways
closedfixed 
5
2.50MP26 
2.50MP282.50MP28 
Core
No
0015983: When importing a big number of POS orders (500 different orders with 2 lines each) an appears
When importing a big number of POS orders (500 different orders with 2 lines each) an appears. The error is:
ERROR org.openbravo.erpCommon.ad_process.ImportProcessData - SQL error in query: UPDATE AD_PInstance SET IsProcessing='N', Updated=to_date(now()), Result=to_number(?), ErrorMsg=TO_CHAR(?) WHERE AD_PInstance_ID = ?Exception:org.postgresql.util.PSQLException: ERROR: value too long for type character varying(2000)
ERROR org.openbravo.erpCommon.ad_process.ImportProcess - Unable to unlock instance - javax.servlet.ServletException: @CODE=0@ERROR: value too long for type character varying(2000)

The problem is in the ErrorMsg column, because the message is bigger than the column size.
- Master Data Management || Import Data || Import Orders
- Import 1000 lines (500 different orders)
- The process fails
The column type MsgText could be changed to LONG
No tags attached.
depends on defect 0016313 closed adrianromero When importing a big number of POS orders (500 different orders with 2 lines each) an appears 
Issue History
2011-02-15 11:48jonalegriaesarteNew Issue
2011-02-15 11:48jonalegriaesarteAssigned To => adrianromero
2011-02-15 11:48jonalegriaesarteModules => Core
2011-02-15 12:54jonalegriaesarteIssue Monitored: networkb
2011-03-15 17:35adrianromeroStatusnew => scheduled
2011-03-15 17:35adrianromeroTypedefect => backport
2011-03-15 17:37adrianromeroIssue cloned0016313
2011-03-15 17:37adrianromeroRelationship addeddepends on 0016313
2011-03-15 17:39hgbotCheckin
2011-03-15 17:39hgbotNote Added: 0034906
2011-03-15 17:39hgbotStatusscheduled => resolved
2011-03-15 17:39hgbotResolutionopen => fixed
2011-03-15 17:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/92881081acbef84ab097df0546c155b3e39df06b [^]
2011-03-15 17:42adrianromeroNote Added: 0034908
2011-03-16 19:08jonalegriaesarteNote Added: 0034964
2011-03-16 19:08jonalegriaesarteNote Added: 0034965
2011-03-16 19:08jonalegriaesarteStatusresolved => closed
2011-03-16 19:08jonalegriaesarteFixed in Version => 2.50MP28

Notes
(0034906)
hgbot   
2011-03-15 17:39   
Repository: erp/stable/2.50
Changeset: 92881081acbef84ab097df0546c155b3e39df06b
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Mar 15 17:38:23 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/92881081acbef84ab097df0546c155b3e39df06b [^]

Fixes issue 0015983: When importing a big number of POS orders (500 different orders with 2 lines each) an appears
It has been protected the import code to not to save more than 2000 characters in the ErrorMsg field

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_process/ImportOrder.java
M src/org/openbravo/erpCommon/ad_process/ImportProcess.java
---
(0034908)
adrianromero   
2011-03-15 17:42   
*Testing the issue

Follow the steps to test and verify that now it does not appear the error and the message generated is less than 2000 characters.

* Other areas affected

No other areas affected. It has only been modified the Import classes.

It has been implemented this fix instead of changing the type of the ErrorMsg field to long because the implemented fix is a local fix that does not affect any other area. To change the type of the ErrorMsg field would be more risky because it will affect globally to the execution of processes all over the application
(0034964)
jonalegriaesarte   
2011-03-16 19:08   
Verified
(0034965)
jonalegriaesarte   
2011-03-16 19:08   
Verified